class_docstr: Classification by Minimum Distance to Mean with geodesic filtering.
  
  Apply geodesic filtering described in [1]_, and classify using MDM.
  The geodesic filtering is achieved in tangent space with a Linear
  Discriminant Analysis, then data are projected back to the manifold and
  classifier with a regular MDM.
  This is basically a pipeline of FGDA and MDM.
  
  Parameters
  ----------
  metric : string | dict, default='riemann'
      The type of metric used for reference matrix estimation (see
      `mean_covariance` for the list of supported metric), for distance
      estimation, and for tangent space map (see `tangent_space` for the list
      of supported metric).
      The metric could be a dict with three keys, `mean`, `dist` and `map` in
      order to pass different metrics for the reference matrix estimation,
      the distance estimation, and the tangent space mapping.
  tsupdate : bool, default=False
      Activate tangent space update for covariante shift correction between
      training and test, as described in [2]_. This is not compatible with
      online implementation. Performance are better when the number of
      matrices for prediction is higher.
  n_jobs : int, default=1
      The number of jobs to use for the computation. This works by computing
      each of the class centroid in parallel.
      If -1 all CPUs are used. If 1 is given, no parallel computing code is
      used at all, which is useful for debugging. For n_jobs below -1,
      (n_cpus + 1 + n_jobs) are used. Thus for n_jobs = -2, all CPUs but one
      are used.
  
  Attributes
  ----------
  classes_ : ndarray, shape (n_classes,)
      Labels for each class.
  
  See Also
  --------
  MDM
  FGDA
  TangentSpace
  
  References
  ----------
  .. [1] `Riemannian geometry applied to BCI classification
      <https://hal.archives-ouvertes.fr/hal-00602700/>`_
      A. Barachant, S. Bonnet, M. Congedo and C. Jutten. 9th International
      Conference Latent Variable Analysis and Signal Separation
      (LVA/ICA 2010), LNCS vol. 6365, 2010, p. 629-636.
  .. [2] `Classification of covariance matrices using a Riemannian-based
      kernel for BCI applications
      <https://hal.archives-ouvertes.fr/hal-00820475/>`_
      A. Barachant, S. Bonnet, M. Congedo and C. Jutten. Neurocomputing,
      Elsevier, 2013, 112, pp.172-178.
class_docstr_tok: ["Classification","by","Minimum","Distance","to","Mean","with","geodesic","filtering",".","Apply","geodesic","filtering","described","in","[","1","]","_",",","and","classify","using","MDM",".","The","geodesic","filtering","is","achieved","in","tangent","space","with","a","Linear","Discriminant","Analysis",",","then","data","are","projected","back","to","the","manifold","and","classifier","with","a","regular","MDM",".","This","is","basically","a","pipeline","of","FGDA","and","MDM",".","Parameters","--","--","--","--","--","metric",":","string","|","dict",",","default='riemann'","The","type","of","metric","used","for","reference","matrix","estimation","(","see","`","mean_covariance","`","for","the","list","of","supported","metric",")",",","for","distance","estimation",",","and","for","tangent","space","map","(","see","`","tangent_space","`","for","the","list","of","supported","metric",")",".","The","metric","could","be","a","dict","with","three","keys",",","`","mean","`",",","`","dist","`","and","`","map","`","in","order","to","pass","different","metrics","for","the","reference","matrix","estimation",",","the","distance","estimation",",","and","the","tangent","space","mapping",".","tsupdate",":","bool",",","default=False","Activate","tangent","space","update","for","covariante","shift","correction","between","training","and","test",",","as","described","in","[","2","]","_",".","This","is","not","compatible","with","online","implementation",".","Performance","are","better","when","the","number","of","matrices","for","prediction","is","higher",".","n_jobs",":","int",",","default=1","The","number","of","jobs","to","use","for","the","computation",".","This","works","by","computing","each","of","the","class","centroid","in","parallel",".","If","-1","all","CPUs","are","used",".","If","1","is","given",",","no","parallel","computing","code","is","used","at","all",",","which","is","useful","for","debugging",".","For","n_jobs","below","-1",",","(","n_cpus","+","1","+","n_jobs",")","are","used",".","Thus","for","n_jobs","=","-2",",","all","CPUs","but","one","are","used",".","Attributes","--","--","--","--","--","classes_",":","ndarray",",","shape","(","n_classes",",",")","Labels","for","each","class",".","See","Also","--","--","--","--","MDM","FGDA","TangentSpace","References","--","--","--","--","--","..","[","1","]","`","Riemannian","geometry","applied","to","BCI","classification","<","https",":","\/\/hal.archives-ouvertes.fr\/hal-00602700\/",">","`","_","A.","Barachant",",","S.","Bonnet",",","M.","Congedo","and","C.","Jutten",".","9th","International","Conference","Latent","Variable","Analysis","and","Signal","Separation","(","LVA\/ICA","2010",")",",","LNCS","vol",".","6365",",","2010",",","p.","629-636",".","..","[","2","]","`","Classification","of","covariance","matrices","using","a","Riemannian-based","kernel","for","BCI","applications","<","https",":","\/\/hal.archives-ouvertes.fr\/hal-00820475\/",">","`","_","A.","Barachant",",","S.","Bonnet",",","M.","Congedo","and","C.","Jutten",".","Neurocomputing",",","Elsevier",",","2013",",","112",",","pp.172-178","."]
docstr: Init.
docstr_tok: ["Init","."]
code: def __init__(self, metric="riemann", tsupdate=False, n_jobs=1):
      """Init."""
      self.metric = metric
      self.n_jobs = n_jobs
      self.tsupdate = tsupdate
  
imports: import functools
  import numpy
  from sklearn.base import BaseEstimator, ClassifierMixin, TransformerMixin
  from sklearn.svm import SVC
  from sklearn.utils.extmath import softmax
  from sklearn.linear_model import LogisticRegression
  from sklearn.pipeline import make_pipeline
  from joblib import Parallel, delayed
  import warnings
  from .utils.kernel import kernel
  from .utils.mean import mean_covariance, mean_power
  from .utils.distance import distance
  from .tangentspace import FGDA, TangentSpace
label_desc: Use image node_id 1 to create a new FgMDM object from inherited base classes: BaseEstimator, ClassifierMixin, TransformerMixin with example: obj = FgMDM(metric, tsupdate, n_jobs)