class_docstr: This is the basic one dimensional Gaussian-Gamma Mixture estimation class
  Note that it can work with positive or negative values,
  as long as there is at least one positive value.
  NB : The gamma distribution is defined only on positive values.
  
  5 scalar members
  - mean: gaussian mean
  - var: gaussian variance (non-negative)
  - shape: gamma shape (non-negative)
  - scale: gamma scale (non-negative)
  - mixt: mixture parameter (non-negative, weight of the gamma)
class_docstr_tok: ["This","is","the","basic","one","dimensional","Gaussian-Gamma","Mixture","estimation","class","Note","that","it","can","work","with","positive","or","negative","values",",","as","long","as","there","is","at","least","one","positive","value",".","NB",":","The","gamma","distribution","is","defined","only","on","positive","values",".","5","scalar","members","-","mean",":","gaussian","mean","-","var",":","gaussian","variance","(","non-negative",")","-","shape",":","gamma","shape","(","non-negative",")","-","scale",":","gamma","scale","(","non-negative",")","-","mixt",":","mixture","parameter","(","non-negative",",","weight","of","the","gamma",")"]
docstr: Visualization of the mm based on the empirical histogram of x
  
  Parameters
  ----------
  x : array of shape (nbitems,)
      the data to be processed
docstr_tok: ["Visualization","of","the","mm","based","on","the","empirical","histogram","of","x","Parameters","--","--","--","--","--","x",":","array","of","shape","(","nbitems",",",")","the","data","to","be","processed"]
code: def show(self, x):
      """Visualization of the mm based on the empirical histogram of x
  
      Parameters
      ----------
      x : array of shape (nbitems,)
          the data to be processed
      """
      step = 3.5 * np.std(x) / np.exp(np.log(np.size(x)) / 3)
      bins = max(10, int((x.max() - x.min()) / step))
      h, c = np.histogram(x, bins)
      h = h.astype(np.float64) / np.size(x)
      p = self.mixt
  
      dc = c[1] - c[0]
      y = (1 - p) * _gaus_dens(self.mean, self.var, c) * dc
      z = np.zeros(np.size(c))
      z = _gam_dens(self.shape, self.scale, c) * p * dc
  
      import matplotlib.pyplot as plt
  
      plt.figure()
      plt.plot(0.5 * (c[1:] + c[:-1]), h)
      plt.plot(c, y, "r")
      plt.plot(c, z, "g")
      plt.plot(c, z + y, "k")
      plt.title("Fit of the density with a Gamma-Gaussians mixture")
      plt.legend(
          (
              "data",
              "gaussian acomponent",
              "gamma component",
              "mixture distribution",
          )
      )
  
imports: import numpy
  import scipy.special
  import scipy.stats
label_desc: Use image node_id 6 for calling the GGM obj's underlying member method code with example usage: obj.show(x) without return types