class_docstr: Transfer learning wrapper for estimators.
  
  This is a wrapper for any BaseEstimator (i.e. classifier or regressor) that
  converts extended labels used in Transfer Learning into the usual y array
  to train a classifier/regressor of choice.
  
  Parameters
  ----------
  target_domain : str
      Domain to consider as target.
  estimator : BaseEstimator
      The estimator to apply on matrices. It can be any regressor or
      classifier from pyRiemann.
  domain_weight : None | dict, default=None
      Weights to combine matrices from each domain to train the estimator.
      The dict contains key=domain_name and value=weight_to_assign.
      If None, it uses equal weights.
  
  Notes
  -----
  .. versionadded:: 0.4
class_docstr_tok: ["Transfer","learning","wrapper","for","estimators",".","This","is","a","wrapper","for","any","BaseEstimator","(","i.e",".","classifier","or","regressor",")","that","converts","extended","labels","used","in","Transfer","Learning","into","the","usual","y","array","to","train","a","classifier\/regressor","of","choice",".","Parameters","--","--","--","--","--","target_domain",":","str","Domain","to","consider","as","target",".","estimator",":","BaseEstimator","The","estimator","to","apply","on","matrices",".","It","can","be","any","regressor","or","classifier","from","pyRiemann",".","domain_weight",":","None","|","dict",",","default=None","Weights","to","combine","matrices","from","each","domain","to","train","the","estimator",".","The","dict","contains","key=domain_name","and","value=weight_to_assign",".","If","None",",","it","uses","equal","weights",".","Notes","--","--","-","..","versionadded",":",":","0.4"]
docstr: Init.
docstr_tok: ["Init","."]
code: def __init__(self, target_domain, estimator, domain_weight=None):
      """Init."""
      self.target_domain = target_domain
      self.domain_weight = domain_weight
      self.estimator = estimator
  
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 1 to create a new TLEstimator object from inherited base classes: BaseEstimator with example: obj = TLEstimator(target_domain, estimator, domain_weight)