metric_learn.base_metric.MetricTransformer

class metric_learn.base_metric.MetricTransformer[source]

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

Methods

transform(X)

Applies the metric transformation.

abstract transform(X)[source]

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 \(XL^{\top}\)

Examples using metric_learn.base_metric.MetricTransformer

Sandwich demo

Sandwich demo

Algorithms walkthrough

Algorithms walkthrough