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: Compute the posterior probability of the three components
  given the data
  
  Parameters
  -----------
  x: array of shape (nbitem,)
      the data under evaluation
  
  Returns
  --------
  ng,y,pg: three arrays of shape(nbitem)
      the posteriori of the 3 components given the data
  
  Notes
  -----
  ng + y + pg = np.ones(nbitem)
docstr_tok: ["Compute","the","posterior","probability","of","the","three","components","given","the","data","Parameters","--","--","--","--","--","-","x",":","array","of","shape","(","nbitem",",",")","the","data","under","evaluation","Returns","--","--","--","--","ng",",","y",",","pg",":","three","arrays","of","shape","(","nbitem",")","the","posteriori","of","the","3","components","given","the","data","Notes","--","--","-","ng","+","y","+","pg","=","np.ones","(","nbitem",")"]
code: def posterior(self, x):
      """
      Compute the posterior probability of the three components
      given the data
  
      Parameters
      -----------
      x: array of shape (nbitem,)
          the data under evaluation
  
      Returns
      --------
      ng,y,pg: three arrays of shape(nbitem)
          the posteriori of the 3 components given the data
  
      Notes
      -----
      ng + y + pg = np.ones(nbitem)
      """
      p = self.mixt
      ng, y, pg = self.component_likelihood(x)
      total = ng * p[0] + y * p[1] + pg * p[2]
      return ng * p[0] / total, y * p[1] / total, pg * p[2] / total
  
imports: import numpy
  import scipy.special
  import scipy.stats
label_desc: Use image node_id 8 for calling the GGGM obj's underlying member method code with example usage: obj.posterior(x) and returns: unknown,  unknown,  unknown