class_docstr: Standard GMM.
  
  this class contains the following members
  k (int): the number of components in the mixture
  dim (int): is the dimension of the data
  prec_type = 'full' (string) is the parameterization
            of the precisions/covariance matrices:
            either 'full' or 'diagonal'.
  means: array of shape (k,dim):
        all the means (mean parameters) of the components
  precisions: array of shape (k,dim,dim):
             the precisions (inverse covariance matrix) of the components
  weights: array of shape(k): weights of the mixture
  
  fixme
  -----
  no copy method
class_docstr_tok: ["Standard","GMM",".","this","class","contains","the","following","members","k","(","int",")",":","the","number","of","components","in","the","mixture","dim","(","int",")",":","is","the","dimension","of","the","data","prec_type","=","'full","'","(","string",")","is","the","parameterization","of","the","precisions\/covariance","matrices",":","either","'full","'","or","'diagonal","'",".","means",":","array","of","shape","(","k",",","dim",")",":","all","the","means","(","mean","parameters",")","of","the","components","precisions",":","array","of","shape","(","k",",","dim",",","dim",")",":","the","precisions","(","inverse","covariance","matrix",")","of","the","components","weights",":","array","of","shape","(","k",")",":","weights","of","the","mixture","fixme","--","--","-","no","copy","method"]
docstr: Initializes self according to a certain dataset x:
  1. sets the regularizing hyper-parameters
  2. initializes z using a k-means algorithm, then
  3. update the parameters
  
  Parameters
  ----------
  x, array of shape (n_samples,self.dim)
     the data used in the estimation process
docstr_tok: ["Initializes","self","according","to","a","certain","dataset","x",":","1.","sets","the","regularizing","hyper-parameters","2.","initializes","z","using","a","k-means","algorithm",",","then","3.","update","the","parameters","Parameters","--","--","--","--","--","x",",","array","of","shape","(","n_samples",",","self.dim",")","the","data","used","in","the","estimation","process"]
code: def initialize(self, x):
      """Initializes self according to a certain dataset x:
      1. sets the regularizing hyper-parameters
      2. initializes z using a k-means algorithm, then
      3. update the parameters
  
      Parameters
      ----------
      x, array of shape (n_samples,self.dim)
         the data used in the estimation process
      """
      from .utils import kmeans
  
      n = x.shape[0]
  
      # 1. set the priors
      self.guess_regularizing(x, bcheck=1)
  
      # 2. initialize the memberships
      if self.k > 1:
          _, z, _ = kmeans(x, self.k)
      else:
          z = np.zeros(n).astype(np.int_)
  
      l = np.zeros((n, self.k))
      l[np.arange(n), z] = 1
  
      # 3.update the parameters
      self.update(x, l)
  
imports: import numpy
  from scipy.linalg import eigvalsh
label_desc: Use image node_id 5 for calling the GMM obj's underlying member method code with example usage: obj.initialize(x) without return types