class_docstr: Transfer learning wrapper for regressors.
  
  This is a wrapper for any regressor that converts extended labels used in
  Transfer Learning into the usual y array to train a regressor of choice.
  
  Parameters
  ----------
  target_domain : str
      Domain to consider as target.
  estimator : BaseRegressor
      The regressor to apply on matrices.
  domain_weight : None | dict, default=None
      Weights to combine matrices from each domain to train the regressor.
      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","regressors",".","This","is","a","wrapper","for","any","regressor","that","converts","extended","labels","used","in","Transfer","Learning","into","the","usual","y","array","to","train","a","regressor","of","choice",".","Parameters","--","--","--","--","--","target_domain",":","str","Domain","to","consider","as","target",".","estimator",":","BaseRegressor","The","regressor","to","apply","on","matrices",".","domain_weight",":","None","|","dict",",","default=None","Weights","to","combine","matrices","from","each","domain","to","train","the","regressor",".","The","dict","contains","key=domain_name","and","value=weight_to_assign",".","If","None",",","it","uses","equal","weights",".","Notes","--","--","-","..","versionadded",":",":","0.4"]
docstr: Return the coefficient of determination of the prediction.
  
  Parameters
  ----------
  X : ndarray, shape (n_matrices, n_channels, n_channels)
      Test set of SPD matrices.
  y_enc : ndarray, shape (n_matrices,)
      Extended true values for each matrix.
  
  Returns
  -------
  score : float
      R2 of self.predict(X) wrt. y.
docstr_tok: ["Return","the","coefficient","of","determination","of","the","prediction",".","Parameters","--","--","--","--","--","X",":","ndarray",",","shape","(","n_matrices",",","n_channels",",","n_channels",")","Test","set","of","SPD","matrices",".","y_enc",":","ndarray",",","shape","(","n_matrices",",",")","Extended","true","values","for","each","matrix",".","Returns","--","--","--","-","score",":","float","R2","of","self.predict","(","X",")","wrt",".","y","."]
code: def score(self, X, y_enc):
      """Return the coefficient of determination of the prediction.
  
      Parameters
      ----------
      X : ndarray, shape (n_matrices, n_channels, n_channels)
          Test set of SPD matrices.
      y_enc : ndarray, shape (n_matrices,)
          Extended true values for each matrix.
  
      Returns
      -------
      score : float
          R2 of self.predict(X) wrt. y.
      """
      _, y_true, _ = decode_domains(X, y_enc)
      y_pred = self.predict(X)
      return r2_score(y_true.astype(float), y_pred)
  
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 2 for calling the TLRegressor obj's underlying member method code with example usage: obj.score(X, y_enc) and returns: r2_score