class_docstr: Empirical Frechet mean.
  
  Parameters
  ----------
  space : Manifold
      Equipped manifold.
  method : str, {\'default\', \'adaptive\', \'batch\'}
      Gradient descent method.
      The `adaptive` method uses a Levenberg-Marquardt style adaptation of
      the learning rate. The `batch` method is similar to the default
      method but for batches of equal length of samples. In this case,
      samples must be of shape [n_samples, n_batch, *space.shape].
      Optional, default: \'default\'.
  
  Attributes
  ----------
  estimate_ : array-like, shape=[*space.shape]
      If fit, Frechet mean.
  
  Notes
  -----
  * Required metric methods for general case:
      * `log`, `exp`, `squared_norm` (for convergence criteria)
class_docstr_tok: ["Empirical","Frechet","mean",".","Parameters","--","--","--","--","--","space",":","Manifold","Equipped","manifold",".","method",":","str",",","{","\\'default\\","'",",","\\'adaptive\\","'",",","\\'batch\\","'","}","Gradient","descent","method",".","The","`","adaptive","`","method","uses","a","Levenberg-Marquardt","style","adaptation","of","the","learning","rate",".","The","`","batch","`","method","is","similar","to","the","default","method","but","for","batches","of","equal","length","of","samples",".","In","this","case",",","samples","must","be","of","shape","[","n_samples",",","n_batch",",","*","space.shape","]",".","Optional",",","default",":","\\'default\\","'",".","Attributes","--","--","--","--","--","estimate_",":","array-like",",","shape=","[","*","space.shape","]","If","fit",",","Frechet","mean",".","Notes","--","--","-","*","Required","metric","methods","for","general","case",":","*","`","log","`",",","`","exp","`",",","`","squared_norm","`","(","for","convergence","criteria",")"]
docstr: Compute the empirical weighted Frechet mean.
  
  Parameters
  ----------
  X : array-like, shape=[n_samples, *metric.shape]
      Training input samples.
  y : None
      Target values. Ignored.
  weights : array-like, shape=[n_samples,]
      Weights associated to the samples.
      Optional, default: None, in which case it is equally weighted.
  
  Returns
  -------
  self : object
      Returns self.
code: def fit(self, X, y=None, weights=None):
      """Compute the empirical weighted Frechet mean.
  
      Parameters
      ----------
      X : array-like, shape=[n_samples, *metric.shape]
          Training input samples.
      y : None
          Target values. Ignored.
      weights : array-like, shape=[n_samples,]
          Weights associated to the samples.
          Optional, default: None, in which case it is equally weighted.
  
      Returns
      -------
      self : object
          Returns self.
      """
      self.estimate_ = self.optimizer.minimize(
          space=self.space,
          points=X,
          weights=weights,
      )
      return self
  
imports: import abc
  import logging
  import math
  from sklearn.base import BaseEstimator
  import geomstats.backend
  import geomstats.errors
  from geomstats.geometry.discrete_curves import ElasticTranslationMetric, SRVTranslationMetric
  from geomstats.geometry.euclidean import EuclideanMetric
  from geomstats.geometry.hypersphere import HypersphereMetric
  from geomstats.geometry.matrices import MatricesMetric
  from geomstats.geometry.minkowski import MinkowskiMetric
label_desc: Use image node_id 6 for calling the FrechetMean obj's underlying member method code with example usage: obj.fit(X, y, weights) and returns: self