scikit-learn-contrib/metric-learn
Metric learning algorithms in Python observed · 2026-08-28
Health v2 · maintenance only
56/100
- Activity 73
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4687
- days_rel: n/a
- days_push: 167
- n_releases_24m: 0
Adoption not part of the score
1438 stars · 231 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
metric-learn is a Python library providing efficient implementations of popular supervised, weakly-supervised, and unsupervised metric learning algorithms such as LMNN, ITML, NCA, and LFDA. As part of scikit-learn-contrib, its API is fully compatible with scikit-learn, enabling use in pipelines and model selection routines.
Use cases
- learn a Mahalanobis distance metric to improve k-NN classification accuracy
- embed data with Neighborhood Components Analysis before clustering
- train a supervised metric from labeled pairs or triplets
- improve nearest-neighbor retrieval with a learned distance
- plug a metric learner into a scikit-learn pipeline with cross-validation
- compare metric learning algorithms like LMNN, ITML, and SDML on a dataset
When to choose
- you need learned distance metrics that integrate with scikit-learn pipelines and model selection
- you want a well-documented collection of classic metric learning algorithms under an MIT license
- you are doing research or prototyping in similarity or representation learning with Python
When to avoid
- you need deep metric learning with neural networks or GPU acceleration
- your project requires actively developed features on the latest scikit-learn versions
- you only need standard distances like Euclidean or cosine without learning
Facets
library · maturity maintenance
machine-learning machine-learning data-science python metric-learning scikit-learn distance-metrics mahalanobis similarity-learning
4 sources
- readme: https://github.com/scikit-learn-contrib/metric-learn · fetched 2026-08-28 · f3569e8e8874
- homepage: http://contrib.scikit-learn.org/metric-learn/ · fetched 2026-08-29 · 844201115d44
- registry_pypi: https://pypi.org/pypi/metric-learn/json · fetched 2026-08-29 · f529c4a9a2da
- site_page: http://contrib.scikit-learn.org/metric-learn/getting_started.html · fetched 2026-08-29 · f4250f1c5c9c
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| scikit-learn-contrib/metric-learn | main | 56 |
For agents
markdown · JSON · MCP: product_card(name="scikit-learn-contrib/metric-learn")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem