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: initialize z using a k-means algorithm, then update the parameters
  
  Parameters
  ----------
  x: array of shape (nb_samples,self.dim)
     the data used in the estimation process
docstr_tok: ["initialize","z","using","a","k-means","algorithm",",","then","update","the","parameters","Parameters","--","--","--","--","--","x",":","array","of","shape","(","nb_samples",",","self.dim",")","the","data","used","in","the","estimation","process"]
code: def initialize(self, x):
      """
      initialize z using a k-means algorithm, then update the parameters
  
      Parameters
      ----------
      x: array of shape (nb_samples,self.dim)
         the data used in the estimation process
      """
      n = x.shape[0]
      if self.k > 1:
          cent, z, J = kmeans(x, self.k)
      else:
          z = np.zeros(x.shape[0]).astype(np.int_)
      l = np.zeros((n, self.k))
      l[np.arange(n), z] = 1
      self._Mstep(x, l)
  
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 5 for calling the VBGMM obj's underlying member method code with example usage: obj.initialize(x) without return types