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: Parameters
  ----------
  alpha: float, optional,
         the parameter for cluster creation
  dim: int, optional,
       the dimension of the the data
  
  Note: use the function set_priors() to set adapted priors
docstr_tok: ["Parameters","--","--","--","--","--","alpha",":","float",",","optional",",","the","parameter","for","cluster","creation","dim",":","int",",","optional",",","the","dimension","of","the","the","data","Note",":","use","the","function","set_priors","(",")","to","set","adapted","priors"]
code: def __init__(self, alpha=0.5, dim=1):
      """
      Parameters
      ----------
      alpha: float, optional,
             the parameter for cluster creation
      dim: int, optional,
           the dimension of the the data
  
      Note: use the function set_priors() to set adapted priors
      """
      self.dim = dim
      self.alpha = alpha
      self.k = 0
      self.prec_type = "full"
  
      # initialize weights
      self.weights = [1]
  
imports: import math
  import numpy
  from scipy.special import gammaln
  from .bgmm import BGMM, detsh
label_desc: Use image node_id 1 to create a new IMM object from inherited base classes: BGMM with example: obj = IMM(alpha, dim)