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: Mstep of the model: maximum likelihood
  estimation of the parameters of the model
  
  Parameters
  ----------
  x  : array of shape (nbitems,)
      input data
  z array of shape(nbitrems, 2)
      the membership matrix
docstr_tok: ["Mstep","of","the","model",":","maximum","likelihood","estimation","of","the","parameters","of","the","model","Parameters","--","--","--","--","--","x",":","array","of","shape","(","nbitems",",",")","input","data","z","array","of","shape","(","nbitrems",",","2",")","the","membership","matrix"]
code: def Mstep(self, x, z):
      """
      Mstep of the model: maximum likelihood
      estimation of the parameters of the model
  
      Parameters
      ----------
      x  : array of shape (nbitems,)
          input data
      z array of shape(nbitrems, 2)
          the membership matrix
      """
      # z[0,:] is the likelihood to be generated by the gamma
      # z[1,:] is the likelihood to be generated by the gaussian
  
      tiny = 1.0e-15
      sz = np.maximum(tiny, np.sum(z, 0))
  
      self.shape, self.scale = _gam_param(x, z[:, 0])
      self.mean = np.dot(x, z[:, 1]) / sz[1]
      self.var = np.dot((x - self.mean) ** 2, z[:, 1]) / sz[1]
      self.mixt = sz[0] / np.size(x)
  
imports: import numpy
  import scipy.special
  import scipy.stats
label_desc: Use image node_id 3 for calling the GGM obj's underlying member method code with example usage: obj.Mstep(x, z) without return types