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: Function to plot a GMM, still in progress
  Currently, works only in 1D and 2D
  
  Parameters
  ----------
  x: array of shape(n_samples, dim)
     the data under study
  gd: GridDescriptor instance
  density: array os shape(prod(gd.n_bins))
           density of the model one the discrete grid implied by gd
           by default, this is recomputed
docstr_tok: ["Function","to","plot","a","GMM",",","still","in","progress","Currently",",","works","only","in","1D","and","2D","Parameters","--","--","--","--","--","x",":","array","of","shape","(","n_samples",",","dim",")","the","data","under","study","gd",":","GridDescriptor","instance","density",":","array","os","shape","(","prod","(","gd.n_bins",")",")","density","of","the","model","one","the","discrete","grid","implied","by","gd","by","default",",","this","is","recomputed"]
code: def show(self, x, gd, density=None, axes=None):
      """
      Function to plot a GMM, still in progress
      Currently, works only in 1D and 2D
  
      Parameters
      ----------
      x: array of shape(n_samples, dim)
         the data under study
      gd: GridDescriptor instance
      density: array os shape(prod(gd.n_bins))
               density of the model one the discrete grid implied by gd
               by default, this is recomputed
      """
      import matplotlib.pyplot as plt
  
      # recompute the density if necessary
      if density is None:
          density = self.mixture_likelihood(gd, x)
  
      if axes is None:
          axes = plt.figure()
  
      if gd.dim == 1:
          from ..statistics.empirical_pvalue import (
              smoothed_histogram_from_samples,
          )
  
          h, c = smoothed_histogram_from_samples(x, normalized=True)
          offset = (c.max() - c.min()) / (2 * c.size)
          grid = gd.make_grid()
  
          h /= h.sum()
          h /= 2 * offset
          plt.plot(c[:-1] + offset, h)
          plt.plot(grid, density)
  
      if gd.dim == 2:
          plt.figure()
          xm, xM, ym, yM = gd.lim[0:3]
          gd0 = gd.n_bins[0]
          Pdens = np.reshape(density, (gd0, np.size(density) / gd0))
          axes.imshow(
              Pdens.T,
              None,
              None,
              None,
              "nearest",
              1.0,
              None,
              None,
              "lower",
              [xm, xM, ym, yM],
          )
          axes.plot(x[:, 0], x[:, 1], ".k")
          axes.axis([xm, xM, ym, yM])
      return axes
  
imports: import numpy
  from scipy.linalg import eigvalsh
label_desc: Use image node_id 24 for calling the GMM obj's underlying member method code with example usage: obj.show(x, gd, density, axes) and returns: axes