class_docstr: Base class for all learners that can transform data into a new space
  with the metric learned.
class_docstr_tok: ["Base","class","for","all","learners","that","can","transform","data","into","a","new","space","with","the","metric","learned","."]
docstr: Applies the metric transformation.
  
  Parameters
  ----------
  X : (n x d) matrix
    Data to transform.
  
  Returns
  -------
  transformed : (n x d) matrix
    Input data transformed to the metric space by :math:`XL^{\top}`
docstr_tok: ["Applies","the","metric","transformation",".","Parameters","--","--","--","--","--","X",":","(","n","x","d",")","matrix","Data","to","transform",".","Returns","--","--","--","-","transformed",":","(","n","x","d",")","matrix","Input","data","transformed","to","the","metric","space","by",":","math",":","`","XL^","{","\\top","}","`"]
code: def transform(self, X):
      """Applies the metric transformation.
  
      Parameters
      ----------
      X : (n x d) matrix
        Data to transform.
  
      Returns
      -------
      transformed : (n x d) matrix
        Input data transformed to the metric space by :math:`XL^{\\top}`
      """
  
imports: from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.utils.extmath import stable_cumsum
  from sklearn.utils.validation import _is_arraylike, check_is_fitted
  from sklearn.metrics import roc_auc_score, roc_curve, precision_recall_curve
  import numpy
  from abc import ABCMeta, abstractmethod
  from ._util import ArrayIndexer, check_input, validate_vector
  import warnings
label_desc: Use image node_id 1 for calling the MetricTransformer obj's underlying member method code with example usage: obj.transform(X) without return types