class_docstr: The class implements Infinite Gaussian Mixture model
  or Dirichlet Process Mixture model.
  This is simply a generalization of Bayesian Gaussian Mixture Models
  with an unknown number of classes.
class_docstr_tok: ["The","class","implements","Infinite","Gaussian","Mixture","model","or","Dirichlet","Process","Mixture","model",".","This","is","simply","a","generalization","of","Bayesian","Gaussian","Mixture","Models","with","an","unknown","number","of","classes","."]
docstr: Computes the likelihood of x under the prior
  
  Parameters
  ----------
  x, array of shape (self.n_samples,self.dim)
  
  returns
  -------
  w, the likelihood of x under the prior model (unweighted)
docstr_tok: ["Computes","the","likelihood","of","x","under","the","prior","Parameters","--","--","--","--","--","x",",","array","of","shape","(","self.n_samples",",","self.dim",")","returns","--","--","--","-","w",",","the","likelihood","of","x","under","the","prior","model","(","unweighted",")"]
code: def likelihood_under_the_prior(self, x):
      """Computes the likelihood of x under the prior
  
      Parameters
      ----------
      x, array of shape (self.n_samples,self.dim)
  
      returns
      -------
      w, the likelihood of x under the prior model (unweighted)
      """
      if self.prior_dens is not None:
          return self.prior_dens * np.ones(x.shape[0])
  
      a = self._prior_dof
      tau = self._prior_shrinkage
      tau /= 1 + tau
      m = self._prior_means
      b = self._prior_scale
      ib = np.linalg.inv(b[0])
      ldb = np.log(detsh(b[0]))
  
      scalar_w = np.log(tau / np.pi) * self.dim
      scalar_w += 2 * gammaln((a + 1) / 2)
      scalar_w -= 2 * gammaln((a - self.dim) / 2)
      scalar_w -= ldb * a
      w = scalar_w * np.ones(x.shape[0])
  
      for i in range(x.shape[0]):
          w[i] -= (a + 1) * np.log(
              detsh(
                  ib + tau * (m - x[i : i + 1]) * (m - x[i : i + 1]).T
              )
          )
  
      w /= 2
      return np.exp(w)
  
imports: import math
  import numpy
  from scipy.special import gammaln
  from .bgmm import BGMM, detsh
label_desc: Use image node_id 11 for calling the IMM obj's underlying member method code with example usage: obj.likelihood_under_the_prior(x) and returns: np, unknown