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: Update function (draw a sample of the IMM parameters)
  
  Parameters
  ----------
  x array of shape (n_samples,self.dim)
    the data used in the estimation process
  z array of shape (n_samples), type = np.int_
    the corresponding classification
docstr_tok: ["Update","function","(","draw","a","sample","of","the","IMM","parameters",")","Parameters","--","--","--","--","--","x","array","of","shape","(","n_samples",",","self.dim",")","the","data","used","in","the","estimation","process","z","array","of","shape","(","n_samples",")",",","type","=","np.int_","the","corresponding","classification"]
code: def update(self, x, z):
      """Update function (draw a sample of the IMM parameters)
  
      Parameters
      ----------
      x array of shape (n_samples,self.dim)
        the data used in the estimation process
      z array of shape (n_samples), type = np.int_
        the corresponding classification
      """
      # re-dimension the priors in order to match self.k
      self.prior_means = np.repeat(self._prior_means, self.k, 0)
      self.prior_dof = self._prior_dof * np.ones(self.k)
      self.prior_shrinkage = self._prior_shrinkage * np.ones(self.k)
      self._dets = self._dets_ * np.ones(self.k)
      self._inv_prior_scale = np.repeat(
          self._inv_prior_scale_, self.k, 0
      )
  
      # initialize some variables
      self.means = np.zeros((self.k, self.dim))
      self.precisions = np.zeros((self.k, self.dim, self.dim))
  
      # proceed with the update
      BGMM.update(self, x, z)
  
imports: import math
  import numpy
  from scipy.special import gammaln
  from .bgmm import BGMM, detsh
label_desc: Use image node_id 8 for calling the IMM obj's underlying member method code with example usage: obj.update(x, z) without return types