class_docstr: Recenter data for transfer learning.
  
  Recenter the data points from each domain to the Identity on manifold, ie
  make the mean of the datasets become the identity. This operation
  corresponds to a whitening step if the SPD matrices represent the spatial
  covariance matrices of multivariate signals.
  
  .. note::
     Using .fit() and then .transform() will give different results than
     .fit_transform(). In fact, .fit_transform() should be applied on the
     training dataset (target and source) and .transform() on the test
     partition of the target dataset.
  
  Parameters
  ----------
  target_domain : str
      Domain to consider as target.
  metric : str, default='riemann'
      The metric for mean, can be: 'ale', 'alm', 'euclid', 'harmonic',
      'identity', 'kullback_sym', 'logdet', 'logeuclid', 'riemann',
      'wasserstein', or a callable function. Note, however, that only when
      using the 'riemann' metric that we are ensured to re-center the data
      points precisely to the Identity.
  
  Attributes
  ----------
  recenter_ : dict
      Dictionary with key=domain_name and value=domain_mean.
  
  References
  ----------
  .. [1] `Transfer Learning: A Riemannian Geometry Framework With
      Applications to Brain–Computer Interfaces
      <https://hal.archives-ouvertes.fr/hal-01923278/>`_
      P Zanini et al, IEEE Transactions on Biomedical Engineering, vol. 65,
      no. 5, pp. 1107-1116, August, 2017
  
  Notes
  -----
  .. versionadded:: 0.4
class_docstr_tok: ["Recenter","data","for","transfer","learning",".","Recenter","the","data","points","from","each","domain","to","the","Identity","on","manifold",",","ie","make","the","mean","of","the","datasets","become","the","identity",".","This","operation","corresponds","to","a","whitening","step","if","the","SPD","matrices","represent","the","spatial","covariance","matrices","of","multivariate","signals",".","..","note",":",":","Using",".fit","(",")","and","then",".transform","(",")","will","give","different","results","than",".fit_transform","(",")",".","In","fact",",",".fit_transform","(",")","should","be","applied","on","the","training","dataset","(","target","and","source",")","and",".transform","(",")","on","the","test","partition","of","the","target","dataset",".","Parameters","--","--","--","--","--","target_domain",":","str","Domain","to","consider","as","target",".","metric",":","str",",","default='riemann'","The","metric","for","mean",",","can","be",":","'ale","'",",","'alm","'",",","'euclid","'",",","'harmonic","'",",","'identity","'",",","'kullback_sym","'",",","'logdet","'",",","'logeuclid","'",",","'riemann","'",",","'wasserstein","'",",","or","a","callable","function",".","Note",",","however",",","that","only","when","using","the","'riemann","'","metric","that","we","are","ensured","to","re-center","the","data","points","precisely","to","the","Identity",".","Attributes","--","--","--","--","--","recenter_",":","dict","Dictionary","with","key=domain_name","and","value=domain_mean",".","References","--","--","--","--","--","..","[","1","]","`","Transfer","Learning",":","A","Riemannian","Geometry","Framework","With","Applications","to","Brain\u2013Computer","Interfaces","<","https",":","\/\/hal.archives-ouvertes.fr\/hal-01923278\/",">","`","_","P","Zanini","et","al",",","IEEE","Transactions","on","Biomedical","Engineering",",","vol",".","65",",","no",".","5",",","pp",".","1107-1116",",","August",",","2017","Notes","--","--","-","..","versionadded",":",":","0.4"]
docstr: Re-center the data points in the target domain to Identity.
  
  Parameters
  ----------
  X : ndarray, shape (n_matrices, n_channels, n_channels)
      Set of SPD matrices.
  y_enc : None
      Not used, here for compatibility with sklearn API.
  
  Returns
  -------
  X : ndarray, shape (n_matrices, n_classes)
      Set of SPD matrices with mean in the Identity.
docstr_tok: ["Re-center","the","data","points","in","the","target","domain","to","Identity",".","Parameters","--","--","--","--","--","X",":","ndarray",",","shape","(","n_matrices",",","n_channels",",","n_channels",")","Set","of","SPD","matrices",".","y_enc",":","None","Not","used",",","here","for","compatibility","with","sklearn","API",".","Returns","--","--","--","-","X",":","ndarray",",","shape","(","n_matrices",",","n_classes",")","Set","of","SPD","matrices","with","mean","in","the","Identity","."]
code: def transform(self, X, y_enc=None):
      """Re-center the data points in the target domain to Identity.
  
      Parameters
      ----------
      X : ndarray, shape (n_matrices, n_channels, n_channels)
          Set of SPD matrices.
      y_enc : None
          Not used, here for compatibility with sklearn API.
  
      Returns
      -------
      X : ndarray, shape (n_matrices, n_classes)
          Set of SPD matrices with mean in the Identity.
      """
      # Used during inference, apply recenter from specified target domain.
      return self.recenter_[self.target_domain].transform(X)
  
imports: import numpy
  from joblib import Parallel, delayed
  from sklearn.base import BaseEstimator, TransformerMixin, is_classifier, is_regressor
  from sklearn.pipeline import Pipeline
  from sklearn.metrics import accuracy_score, r2_score
  from ..utils.mean import mean_covariance, mean_riemann
  from ..utils.distance import distance
  from ..utils.base import invsqrtm, powm, sqrtm
  from ..utils.geodesic import geodesic
  from ..utils.utils import check_weights
  from ._rotate import _get_rotation_matrix
  from ..classification import MDM, _check_metric
  from ..preprocessing import Whitening
  from ._tools import decode_domains
label_desc: Use image node_id 3 for calling the TLCenter obj's underlying member method code with example usage: obj.transform(X, y_enc) and returns: self