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: Update probabilistic memberships of the three components
  
  Parameters
  ----------
  x: array of shape (nbitems,)
      the input data
  
  Returns
  -------
  z: ndarray of shape (nbitems, 3)
      probabilistic membership
  
  Notes
  -----
  z[0,:] is the membership the negative gamma
  z[1,:] is the membership of  the gaussian
  z[2,:] is the membership of the positive gamma
docstr_tok: ["Update","probabilistic","memberships","of","the","three","components","Parameters","--","--","--","--","--","x",":","array","of","shape","(","nbitems",",",")","the","input","data","Returns","--","--","--","-","z",":","ndarray","of","shape","(","nbitems",",","3",")","probabilistic","membership","Notes","--","--","-","z","[","0",",",":","]","is","the","membership","the","negative","gamma","z","[","1",",",":","]","is","the","membership","of","the","gaussian","z","[","2",",",":","]","is","the","membership","of","the","positive","gamma"]
code: def Estep(self, x):
      """Update probabilistic memberships of the three components
  
      Parameters
      ----------
      x: array of shape (nbitems,)
          the input data
  
      Returns
      -------
      z: ndarray of shape (nbitems, 3)
          probabilistic membership
  
      Notes
      -----
      z[0,:] is the membership the negative gamma
      z[1,:] is the membership of  the gaussian
      z[2,:] is the membership of the positive gamma
      """
      tiny = 1.0e-15
      z = np.array(self.component_likelihood(x)).T * self.mixt
      sz = np.maximum(tiny, np.sum(z, 1))
      L = np.mean(np.log(sz))
      z = (z.T / sz).T
      return z, L
  
imports: import numpy
  import scipy.special
  import scipy.stats
label_desc: Use image node_id 6 for calling the GGGM obj's underlying member method code with example usage: obj.Estep(x) and returns: z,  L