metric_learn package

Module Contents

Base Classes

metric_learn.Constraints(partial_labels)

Class to build constraints from labeled data.

metric_learn.base_metric.BaseMetricLearner([...])

Base class for all metric-learners.

metric_learn.base_metric.MetricTransformer()

Base class for all learners that can transform data into a new space with the metric learned.

metric_learn.base_metric.MahalanobisMixin([...])

Mahalanobis metric learning algorithms.

metric_learn.base_metric._PairsClassifierMixin([...])

Base class for pairs learners.

metric_learn.base_metric._TripletsClassifierMixin([...])

Base class for triplets learners.

metric_learn.base_metric._QuadrupletsClassifierMixin([...])

Base class for quadruplets learners.

Supervised Learning Algorithms

metric_learn.LFDA([n_components, k, ...])

Local Fisher Discriminant Analysis for Supervised Dimensionality Reduction

metric_learn.LMNN([init, n_neighbors, ...])

Large Margin Nearest Neighbor (LMNN)

metric_learn.MLKR([n_components, init, tol, ...])

Metric Learning for Kernel Regression (MLKR)

metric_learn.NCA([init, n_components, ...])

Neighborhood Components Analysis (NCA)

metric_learn.RCA([n_components, preprocessor])

Relevant Components Analysis (RCA)

metric_learn.ITML_Supervised([gamma, ...])

Supervised version of Information Theoretic Metric Learning (ITML)

metric_learn.LSML_Supervised([tol, ...])

Supervised version of Least Squared-residual Metric Learning (LSML)

metric_learn.MMC_Supervised([max_iter, ...])

Supervised version of Mahalanobis Metric for Clustering (MMC)

metric_learn.SDML_Supervised([...])

Supervised version of Sparse Distance Metric Learning (SDML)

metric_learn.RCA_Supervised([n_components, ...])

Supervised version of Relevant Components Analysis (RCA)

metric_learn.SCML_Supervised([k_genuine, ...])

Supervised version of Sparse Compositional Metric Learning (SCML)

Weakly Supervised Learning Algorithms

metric_learn.ITML([gamma, max_iter, tol, ...])

Information Theoretic Metric Learning (ITML)

metric_learn.LSML([tol, max_iter, prior, ...])

Least Squared-residual Metric Learning (LSML)

metric_learn.MMC([max_iter, max_proj, tol, ...])

Mahalanobis Metric for Clustering (MMC)

metric_learn.SDML([balance_param, ...])

Sparse Distance Metric Learning (SDML)

metric_learn.SCML([beta, basis, n_basis, ...])

Sparse Compositional Metric Learning (SCML)

Unsupervised Learning Algorithms

metric_learn.Covariance([preprocessor])

Covariance metric (baseline method)