class_docstr: Diagonal multivariate normal mixture model
class_docstr_tok: ["Diagonal","multivariate","normal","mixture","model"]
docstr: n dimensional mixture of m MVNs.
  
  Args:
      means (nparray): (n, m) means for each m component.
      diag_var (nparray): (n, m) variances for each m component.
      coefficients (Nonetype or nparray): (m, 1) mixture component 
          coefficients. If none, use a coefficient of 1/m for each.
docstr_tok: ["n","dimensional","mixture","of","m","MVNs",".","Args",":","means","(","nparray",")",":","(","n",",","m",")","means","for","each","m","component",".","diag_var","(","nparray",")",":","(","n",",","m",")","variances","for","each","m","component",".","coefficients","(","Nonetype","or","nparray",")",":","(","m",",","1",")","mixture","component","coefficients",".","If","none",",","use","a","coefficient","of","1\/m","for","each","."]
code: def __init__(self, means, diag_var, coefficients=None):
      """
      n dimensional mixture of m MVNs.
  
      Args:
          means (nparray): (n, m) means for each m component.
          diag_var (nparray): (n, m) variances for each m component.
          coefficients (Nonetype or nparray): (m, 1) mixture component
              coefficients. If none, use a coefficient of 1/m for each.
      """
      self.n = means.shape[0]
      self.m = means.shape[1]
      assert self.n == diag_var.shape[0]
      assert self.m == diag_var.shape[1]
  
      if coefficients is None:
          coefficients = np.ones((self.m, 1)) / self.m
  
      self.means = means
      self.diag_var = diag_var
      self.coefficients = coefficients
  
file_path: elu-gelu-kernels/code/mvn_mixture/diag_mvn_mixture.py
imports: import numpy
  from scipy import special
  from scipy.stats.mstats import mquantiles
label_desc: Use image node_id 1 to create a new DiagMVNMixture object from inherited base classes: object with example: obj = DiagMVNMixture(means, diag_var, coefficients)