class_docstr: The basic one dimensional Gamma-Gaussian-Gamma Mixture estimation
  class, where the first gamma has a negative sign, while the second
  one has a positive sign.
  
  7 parameters are used:
  - shape_n: negative gamma shape
  - scale_n: negative gamma scale
  - mean: gaussian mean
  - var: gaussian variance
  - shape_p: positive gamma shape
  - scale_p: positive gamma scale
  - mixt: array of mixture parameter
  (weights of the n-gamma,gaussian and p-gamma)
class_docstr_tok: ["The","basic","one","dimensional","Gamma-Gaussian-Gamma","Mixture","estimation","class",",","where","the","first","gamma","has","a","negative","sign",",","while","the","second","one","has","a","positive","sign",".","7","parameters","are","used",":","-","shape_n",":","negative","gamma","shape","-","scale_n",":","negative","gamma","scale","-","mean",":","gaussian","mean","-","var",":","gaussian","variance","-","shape_p",":","positive","gamma","shape","-","scale_p",":","positive","gamma","scale","-","mixt",":","array","of","mixture","parameter","(","weights","of","the","n-gamma",",","gaussian","and","p-gamma",")"]
docstr: initialization of the different parameters
  
  Parameters
  ----------
  x: array of shape(nbitems)
     the data to be processed
  mixt : None or array of shape(3), optional
     prior mixing proportions. If None, the classes have equal weight
docstr_tok: ["initialization","of","the","different","parameters","Parameters","--","--","--","--","--","x",":","array","of","shape","(","nbitems",")","the","data","to","be","processed","mixt",":","None","or","array","of","shape","(","3",")",",","optional","prior","mixing","proportions",".","If","None",",","the","classes","have","equal","weight"]
code: def init(self, x, mixt=None):
      """
      initialization of the different parameters
  
      Parameters
      ----------
      x: array of shape(nbitems)
         the data to be processed
      mixt : None or array of shape(3), optional
         prior mixing proportions. If None, the classes have equal weight
      """
      if mixt is not None:
          if np.size(mixt) == 3:
              self.mixt = np.ravel(mixt)
          else:
              raise ValueError("bad size for mixt")
  
      # gaussian
      self.mean = np.mean(x)
      self.var = np.var(x)
  
      # negative gamma
      i = np.ravel(np.nonzero(x < 0))
      if np.size(i) > 0:
          mn = -np.mean(x[i])
          vn = np.var(x[i])
          self.scale_n = vn / mn
          self.shape_n = mn**2 / vn
      else:
          self.mixt[0] = 0
  
      # positive gamma
      i = np.ravel(np.nonzero(x > 0))
      if np.size(i) > 0:
          mp = np.mean(x[i])
          vp = np.var(x[i])
          self.scale_p = vp / mp
          self.shape_p = mp**2 / vp
      else:
          self.mixt[2] = 0
  
      # mixing proportions
      self.mixt = self.mixt / np.sum(self.mixt)
  
imports: import numpy
  import scipy.special
  import scipy.stats
label_desc: Use image node_id 3 for calling the GGGM obj's underlying member method code with example usage: obj.init(x, mixt) without return types