class_docstr: Minimum Distance to Mean (MDM) classifier on manifolds.
  
  Classification by nearest centroid. For each of the given classes, a
  centroid is estimated according to the chosen metric. Then, for each new
  point, the class is affected according to the nearest centroid [BBCJ2012]_.
  
  Parameters
  ----------
  space : Manifold
      Equipped manifold.
  
  Attributes
  ----------
  classes_ : array-like, shape=[n_classes,]
      If fit, labels of training set.
  mean_estimates_ : array-like, shape=[n_classes, *space.shape]
      If fit, centroids computed on training set.
  
  Notes
  -----
  * Required metric methods: `squared_dist`, `closest_neighbot_index`.
  
  References
  ----------
  .. [BBCJ2012] A. Barachant, S. Bonnet, M. Congedo and C. Jutten, Multiclass
      Brain-Computer Interface Classification by Riemannian Geometry. IEEE
      Trans. Biomed. Eng., vol. 59, pp. 920-928, 2012.
class_docstr_tok: ["Minimum","Distance","to","Mean","(","MDM",")","classifier","on","manifolds",".","Classification","by","nearest","centroid",".","For","each","of","the","given","classes",",","a","centroid","is","estimated","according","to","the","chosen","metric",".","Then",",","for","each","new","point",",","the","class","is","affected","according","to","the","nearest","centroid","[","BBCJ2012","]","_.","Parameters","--","--","--","--","--","space",":","Manifold","Equipped","manifold",".","Attributes","--","--","--","--","--","classes_",":","array-like",",","shape=","[","n_classes",",","]","If","fit",",","labels","of","training","set",".","mean_estimates_",":","array-like",",","shape=","[","n_classes",",","*","space.shape","]","If","fit",",","centroids","computed","on","training","set",".","Notes","--","--","-","*","Required","metric","methods",":","`","squared_dist","`",",","`","closest_neighbot_index","`",".","References","--","--","--","--","--","..","[","BBCJ2012","]","A.","Barachant",",","S.","Bonnet",",","M.","Congedo","and","C.","Jutten",",","Multiclass","Brain-Computer","Interface","Classification","by","Riemannian","Geometry",".","IEEE","Trans",".","Biomed",".","Eng.",",","vol",".","59",",","pp",".","920-928",",","2012","."]
docstr: Compute probabilities.
  
  Compute probabilities to belong to classes according to
  riemannian_metric.
  
  Parameters
  ----------
  X : array-like, shape=[n_samples, *space.shape]
      Test samples.
  
  Returns
  -------
  probas : array-like, shape=[n_samples, n_classes]
      Probability of the sample for each class in the model.
docstr_tok: ["Compute","probabilities",".","Compute","probabilities","to","belong","to","classes","according","to","riemannian_metric",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape=","[","n_samples",",","*","space.shape","]","Test","samples",".","Returns","--","--","--","-","probas",":","array-like",",","shape=","[","n_samples",",","n_classes","]","Probability","of","the","sample","for","each","class","in","the","model","."]
code: def predict_proba(self, X):
      """Compute probabilities.
  
      Compute probabilities to belong to classes according to
      riemannian_metric.
  
      Parameters
      ----------
      X : array-like, shape=[n_samples, *space.shape]
          Test samples.
  
      Returns
      -------
      probas : array-like, shape=[n_samples, n_classes]
          Probability of the sample for each class in the model.
      """
      dists2 = gs.stack(
          [
              self.space.metric.squared_dist(
                  X,
                  mean_estimate,
              )
              for mean_estimate in self.mean_estimates_
          ],
          axis=-1,
      )
      probas = softmax(-dists2, axis=-1)
      return gs.from_numpy(probas)
  
file_path: geomstats/geomstats/learning/mdm.py
imports: from scipy.special import softmax
  from sklearn.base import BaseEstimator, ClassifierMixin
  import geomstats.backend
  from geomstats.learning._template import TransformerMixin
  from geomstats.learning.frechet_mean import FrechetMean
label_desc: Use image node_id 5 for calling the RiemannianMinimumDistanceToMean obj's underlying member method code with example usage: obj.predict_proba(X) and returns: gs