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: return the MAP labelling of x
  
  Parameters
  ----------
  x array of shape (nb_samples,dim)
    the data under study
  like=None array of shape(nb_samples,self.k)
         component-wise likelihood
         if like==None, it is recomputed
  
  Returns
  -------
  z: array of shape(nb_samples): the resulting MAP labelling
     of the rows of x
docstr_tok: ["return","the","MAP","labelling","of","x","Parameters","--","--","--","--","--","x","array","of","shape","(","nb_samples",",","dim",")","the","data","under","study","like=None","array","of","shape","(","nb_samples",",","self.k",")","component-wise","likelihood","if","like==None",",","it","is","recomputed","Returns","--","--","--","-","z",":","array","of","shape","(","nb_samples",")",":","the","resulting","MAP","labelling","of","the","rows","of","x"]
code: def map_label(self, x, like=None):
      """
      return the MAP labelling of x
  
      Parameters
      ----------
      x array of shape (nb_samples,dim)
        the data under study
      like=None array of shape(nb_samples,self.k)
             component-wise likelihood
             if like==None, it is recomputed
  
      Returns
      -------
      z: array of shape(nb_samples): the resulting MAP labelling
         of the rows of x
      """
      if like is None:
          like = self.likelihood(x)
      z = np.argmax(like, 1)
      return z
  
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 6 for calling the VBGMM obj's underlying member method code with example usage: obj.map_label(x, like) and returns: z