class_docstr: Gaussian mixture model (GMM).
  
  Parameters
  ----------
  space : Manifold
      Equipped manifold.
  means : array-like, shape=[n_gaussians, dim]
      Means of each component of the GMM.
  variances : array-like, shape=[n_gaussians,]
      Variances of each component of the GMM.
  
  Attributes
  ----------
  normalization_factor_var : array-like, shape=[n_variances,]
      Array of computed normalization factor.
  variances_range : array-like, shape=[n_variances,]
      Array of standard deviations.
  phi_inv_var : array-like, shape=[n_variances,]
      Array of the computed inverse of a function phi
      whose expression is closed-form
      :math:`\sigma\mapsto \sigma^3 \times \frac{d}
      {\mathstrut d\sigma}\log \zeta_m(\sigma)`
      where :math:`\sigma` denotes the variance
      and :math:`\zeta` the normalization coefficient
      and :math:`m` the dimension.
class_docstr_tok: ["Gaussian","mixture","model","(","GMM",")",".","Parameters","--","--","--","--","--","space",":","Manifold","Equipped","manifold",".","means",":","array-like",",","shape=","[","n_gaussians",",","dim","]","Means","of","each","component","of","the","GMM",".","variances",":","array-like",",","shape=","[","n_gaussians",",","]","Variances","of","each","component","of","the","GMM",".","Attributes","--","--","--","--","--","normalization_factor_var",":","array-like",",","shape=","[","n_variances",",","]","Array","of","computed","normalization","factor",".","variances_range",":","array-like",",","shape=","[","n_variances",",","]","Array","of","standard","deviations",".","phi_inv_var",":","array-like",",","shape=","[","n_variances",",","]","Array","of","the","computed","inverse","of","a","function","phi","whose","expression","is","closed-form",":","math",":","`","\\sigma\\mapsto","\\sigma^3","\\times","\\frac","{","d","}","{","\\mathstrut","d\\sigma","}","\\log","\\zeta_m","(","\\sigma",")","`","where",":","math",":","`","\\sigma","`","denotes","the","variance","and",":","math",":","`","\\zeta","`","the","normalization","coefficient","and",":","math",":","`","m","`","the","dimension","."]
docstr: Return the probability density function of a GMM.
  
  Parameters
  ----------
  mixture_coefficients : array-like, shape=[n_gaussians,]
      Coefficients of the Gaussian mixture model.
  mesh_data : array-like, shape=[n_precision, dim]
      Points at which the GMM probability density is computed.
  
  Returns
  -------
  weighted_pdf : array-like, shape=[n_precision, n_gaussians,]
      Probability density function computed for each point of
      the mesh data, for each component of the GMM.
docstr_tok: ["Return","the","probability","density","function","of","a","GMM",".","Parameters","--","--","--","--","--","mixture_coefficients",":","array-like",",","shape=","[","n_gaussians",",","]","Coefficients","of","the","Gaussian","mixture","model",".","mesh_data",":","array-like",",","shape=","[","n_precision",",","dim","]","Points","at","which","the","GMM","probability","density","is","computed",".","Returns","--","--","--","-","weighted_pdf",":","array-like",",","shape=","[","n_precision",",","n_gaussians",",","]","Probability","density","function","computed","for","each","point","of","the","mesh","data",",","for","each","component","of","the","GMM","."]
code: def weighted_pdf(self, mixture_coefficients, mesh_data):
      """Return the probability density function of a GMM.
  
      Parameters
      ----------
      mixture_coefficients : array-like, shape=[n_gaussians,]
          Coefficients of the Gaussian mixture model.
      mesh_data : array-like, shape=[n_precision, dim]
          Points at which the GMM probability density is computed.
  
      Returns
      -------
      weighted_pdf : array-like, shape=[n_precision, n_gaussians,]
          Probability density function computed for each point of
          the mesh data, for each component of the GMM.
      """
      distance_to_mean = self.space.metric.dist_broadcast(
          mesh_data, self.means
      )
  
      variances_units = gs.expand_dims(self.variances, 0)
      variances_units = gs.repeat(
          variances_units, distance_to_mean.shape[0], axis=0
      )
  
      distribution_normal = gs.exp(
          -(distance_to_mean**2) / (2 * variances_units**2)
      )
  
      zeta_sigma = (2 * gs.pi) ** (2 / 3) * self.variances
      zeta_sigma = zeta_sigma * gs.exp(
          (self.variances**2 / 2)
          * gs.erf(self.variances / gs.sqrt(2))
      )
  
      result_num = gs.expand_dims(mixture_coefficients, 0)
      result_num = gs.repeat(
          result_num, len(distribution_normal), axis=0
      )
      result_num = result_num * distribution_normal
  
      result_denum = gs.expand_dims(zeta_sigma, 0)
      result_denum = gs.repeat(
          result_denum, len(distribution_normal), axis=0
      )
  
      weighted_pdf = result_num / result_denum
  
      return weighted_pdf
  
imports: import logging
  from sklearn.base import BaseEstimator, ClusterMixin
  import geomstats.backend
  from geomstats.learning._template import TransformerMixin
  from geomstats.learning.frechet_mean import FrechetMean, variance
  from geomstats.learning.kmeans import RiemannianKMeans
label_desc: Use image node_id 6 for calling the GaussianMixtureModel obj's underlying member method code with example usage: obj.weighted_pdf(mixture_coefficients, mesh_data) and returns: weighted_pdf