class_docstr: Mahalanobis metric learning algorithms.
  
  Algorithm that learns a Mahalanobis (pseudo) distance :math:`d_M(x, x')`,
  defined between two column vectors :math:`x` and :math:`x'` by: :math:`d_M(x,
  x') = \sqrt{(x-x')^T M (x-x')}`, where :math:`M` is a learned symmetric
  positive semi-definite (PSD) matrix. The metric between points can then be
  expressed as the euclidean distance between points embedded in a new space
  through a linear transformation. Indeed, the above matrix can be decomposed
  into the product of two transpose matrices (through SVD or Cholesky
  decomposition): :math:`d_M(x, x')^2 = (x-x')^T M (x-x') = (x-x')^T L^T L
  (x-x') = (L x - L x')^T (L x- L x')`
  
  Attributes
  ----------
  components_ : `numpy.ndarray`, shape=(n_components, n_features)
    The learned linear transformation ``L``.
class_docstr_tok: ["Mahalanobis","metric","learning","algorithms",".","Algorithm","that","learns","a","Mahalanobis","(","pseudo",")","distance",":","math",":","`","d_M","(","x",",","x","'",")","`",",","defined","between","two","column","vectors",":","math",":","`","x","`","and",":","math",":","`","x","'","`","by",":",":","math",":","`","d_M","(","x",",","x","'",")","=","\\sqrt","{","(","x-x","'",")","^T","M","(","x-x","'",")","}","`",",","where",":","math",":","`","M","`","is","a","learned","symmetric","positive","semi-definite","(","PSD",")","matrix",".","The","metric","between","points","can","then","be","expressed","as","the","euclidean","distance","between","points","embedded","in","a","new","space","through","a","linear","transformation",".","Indeed",",","the","above","matrix","can","be","decomposed","into","the","product","of","two","transpose","matrices","(","through","SVD","or","Cholesky","decomposition",")",":",":","math",":","`","d_M","(","x",",","x","'",")","^2","=","(","x-x","'",")","^T","M","(","x-x","'",")","=","(","x-x","'",")","^T","L^T","L","(","x-x","'",")","=","(","L","x","-","L","x","'",")","^T","(","L","x-","L","x","'",")","`","Attributes","--","--","--","--","--","components_",":","`","numpy.ndarray","`",",","shape=","(","n_components",",","n_features",")","The","learned","linear","transformation","``","L","``","."]
docstr: Embeds data points in the learned linear embedding space.
  
  Transforms samples in ``X`` into ``X_embedded``, samples inside a new
  embedding space such that: ``X_embedded = X.dot(L.T)``, where ``L`` is
  the learned linear transformation (See :class:`MahalanobisMixin`).
  
  Parameters
  ----------
  X : `numpy.ndarray`, shape=(n_samples, n_features)
    The data points to embed.
  
  Returns
  -------
  X_embedded : `numpy.ndarray`, shape=(n_samples, n_components)
    The embedded data points.
docstr_tok: ["Embeds","data","points","in","the","learned","linear","embedding","space",".","Transforms","samples","in","``","X","``","into","``","X_embedded","``",",","samples","inside","a","new","embedding","space","such","that",":","``","X_embedded","=","X.dot","(","L.T",")","``",",","where","``","L","``","is","the","learned","linear","transformation","(","See",":","class",":","`","MahalanobisMixin","`",")",".","Parameters","--","--","--","--","--","X",":","`","numpy.ndarray","`",",","shape=","(","n_samples",",","n_features",")","The","data","points","to","embed",".","Returns","--","--","--","-","X_embedded",":","`","numpy.ndarray","`",",","shape=","(","n_samples",",","n_components",")","The","embedded","data","points","."]
code: def transform(self, X):
      """Embeds data points in the learned linear embedding space.
  
      Transforms samples in ``X`` into ``X_embedded``, samples inside a new
      embedding space such that: ``X_embedded = X.dot(L.T)``, where ``L`` is
      the learned linear transformation (See :class:`MahalanobisMixin`).
  
      Parameters
      ----------
      X : `numpy.ndarray`, shape=(n_samples, n_features)
        The data points to embed.
  
      Returns
      -------
      X_embedded : `numpy.ndarray`, shape=(n_samples, n_components)
        The embedded data points.
      """
      check_is_fitted(self, ["preprocessor_", "components_"])
      X_checked = check_input(
          X,
          type_of_inputs="classic",
          estimator=self,
          preprocessor=self.preprocessor_,
          accept_sparse=True,
      )
      return X_checked.dot(self.components_.T)
  
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 4 for calling the MahalanobisMixin obj's underlying member method code with example usage: obj.transform(X) and returns: X_checked