class_docstr: Subclass of Bayesian GMMs (BGMM)
  that implements Variational Bayes estimation of the parameters
class_docstr_tok: ["Subclass","of","Bayesian","GMMs","(","BGMM",")","that","implements","Variational","Bayes","estimation","of","the","parameters"]
docstr: estimation of self given x
  
  Parameters
  ----------
  x array of shape (nb_samples,dim)
    the data from which the model is estimated
  z = None: array of shape (nb_samples)
    a prior labelling of the data to initialize the computation
  niter=100: maximal number of iterations in the estimation process
  delta = 1.e-4: increment of data likelihood at which
        convergence is declared
  verbose=0:
          verbosity mode
docstr_tok: ["estimation","of","self","given","x","Parameters","--","--","--","--","--","x","array","of","shape","(","nb_samples",",","dim",")","the","data","from","which","the","model","is","estimated","z","=","None",":","array","of","shape","(","nb_samples",")","a","prior","labelling","of","the","data","to","initialize","the","computation","niter=100",":","maximal","number","of","iterations","in","the","estimation","process","delta","=","1.e-4",":","increment","of","data","likelihood","at","which","convergence","is","declared","verbose=0",":","verbosity","mode"]
code: def estimate(self, x, niter=100, delta=1.0e-4, verbose=0):
      """estimation of self given x
  
      Parameters
      ----------
      x array of shape (nb_samples,dim)
        the data from which the model is estimated
      z = None: array of shape (nb_samples)
        a prior labelling of the data to initialize the computation
      niter=100: maximal number of iterations in the estimation process
      delta = 1.e-4: increment of data likelihood at which
            convergence is declared
      verbose=0:
              verbosity mode
      """
      # alternation of E/M step until convergence
      tiny = 1.0e-15
      av_ll_old = -np.inf
      for i in range(niter):
          like = self._Estep(x)
          av_ll = np.mean(np.log(np.maximum(np.sum(like, 1), tiny)))
          if av_ll < av_ll_old + delta:
              if verbose:
                  print(
                      "iteration:",
                      i,
                      "log-likelihood:",
                      av_ll,
                      "old value:",
                      av_ll_old,
                  )
              break
          else:
              av_ll_old = av_ll
          if verbose:
              print(i, av_ll, self.bic(like))
          like = (like.T / np.maximum(like.sum(1), tiny)).T
          self._Mstep(x, like)
  
imports: import math
  import numpy
  import numpy.random
  from scipy.linalg import cholesky, eigvalsh, inv
  from scipy.special import gammaln
  from .gmm import GMM
  from .utils import kmeans
label_desc: Use image node_id 7 for calling the VBGMM obj's underlying member method code with example usage: obj.estimate(x, niter, delta, verbose) without return types