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: Set up function for the normalization factor.
  
  The normalization factor is used to define Gaussian distributions
  at initialization.
docstr_tok: ["Set","up","function","for","the","normalization","factor",".","The","normalization","factor","is","used","to","define","Gaussian","distributions","at","initialization","."]
code: def _normalization_factor_init(self):
      r"""Set up function for the normalization factor.
  
      The normalization factor is used to define Gaussian distributions
      at initialization.
      """
      variances = gs.arange(
          self.zeta_lower_bound, self.zeta_upper_bound, self.zeta_step
      )
      normalization_factor_var = self.space.metric.normalization_factor(
          variances
      )
  
      cond_1 = (
          normalization_factor_var.sum()
          != normalization_factor_var.sum()
      )
      cond_2 = normalization_factor_var.sum() == float("+inf")
      cond_3 = normalization_factor_var.sum() == float("-inf")
  
      if cond_1 or cond_2 or cond_3:
          logging.warning("Untractable normalization factor :")
  
          limit_nf = (
              (
                  (normalization_factor_var / normalization_factor_var)
                  * 0
              )
              .nonzero()[0]
              .item()
          )
          max_nf = len(variances)
          variances = variances[0:limit_nf]
          normalization_factor_var = normalization_factor_var[
              0:limit_nf
          ]
          if cond_1:
              logging.warning(
                  "\t Nan value " "in processing normalization factor"
              )
          if cond_2 or cond_3:
              raise ValueError(
                  "\t +-inf value in " "processing normalization factor"
              )
  
          logging.warning(
              "\t Max variance is now : %s", str(variances[-1])
          )
          logging.warning(
              "\t Number of possible variance is now: %s / %s ",
              str(len(variances)),
              str(max_nf),
          )
  
      _, log_grad_zeta = self.space.metric.norm_factor_gradient(
          variances
      )
  
      phi_inv_var = variances**3 * log_grad_zeta
  
      return variances, normalization_factor_var, phi_inv_var
  
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 2 for calling the GaussianMixtureModel obj's underlying member method code with example usage: obj._normalization_factor_init() and returns: variances,  normalization_factor_var,  phi_inv_var