def __call__(self, x):
"""Return the GMM likelihood for given point(s).
See :eq:`gmm-likelihood`.
Arguments
---------
x : scalar (or) 1D array of reals
Point(s) at which likelihood needs to be computed
Returns
-------
scalar (or) 1D array
Likelihood values at the given point(s)
"""
if np.isscalar(x):
return self.get_gmm_pdf(x)
else:
return np.array([self.get_gmm_pdf(t) for t in x])
评论列表
文章目录