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: Returns a copy of the Mahalanobis matrix learned by the metric learner.
  
  Returns
  -------
  M : `numpy.ndarray`, shape=(n_features, n_features)
    The copy of the learned Mahalanobis matrix.
docstr_tok: ["Returns","a","copy","of","the","Mahalanobis","matrix","learned","by","the","metric","learner",".","Returns","--","--","--","-","M",":","`","numpy.ndarray","`",",","shape=","(","n_features",",","n_features",")","The","copy","of","the","learned","Mahalanobis","matrix","."]
code: def get_mahalanobis_matrix(self):
      """Returns a copy of the Mahalanobis matrix learned by the metric learner.
  
      Returns
      -------
      M : `numpy.ndarray`, shape=(n_features, n_features)
        The copy of the learned Mahalanobis matrix.
      """
      check_is_fitted(self, "components_")
      return self.components_.T.dot(self.components_)
  
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 6 for calling the MahalanobisMixin obj's underlying member method code with example usage: obj.get_mahalanobis_matrix() and returns: self