@@ -2,103 +2,31 @@ metric-learn: Metric Learning in Python
22=======================================
33|License | |PyPI version |
44
5- Distance metrics are widely used in the machine learning literature.
6- Traditionally, practicioners would choose a standard distance metric
7- (Euclidean, City-Block, Cosine, etc.) using a priori knowledge of
8- the domain.
9- Distance metric learning (or simply, metric learning) is the sub-field of
10- machine learning dedicated to automatically constructing optimal distance
11- metrics.
12-
13- This package contains efficient Python implementations of several popular
14- metric learning algorithms.
15-
16- Supervised Algorithms
17- ---------------------
18- Supervised metric learning algorithms take as inputs points `X ` and target
19- labels `y `, and learn a distance matrix that make points from the same class
20- (for classification) or with close target value (for regression) close to
21- each other, and points from different classes or with distant target values
22- far away from each other.
5+ Welcome to metric-learn's documentation !
6+ -----------------------------------------
237
248.. toctree ::
25- :maxdepth: 1
26-
27- metric_learn.covariance
28- metric_learn.lmnn
29- metric_learn.nca
30- metric_learn.lfda
31- metric_learn.mlkr
9+ :maxdepth: 2
3210
33- Weakly-Supervised Algorithms
34- --------------------------
35- Weakly supervised algorithms work on weaker information about the data points
36- than supervised algorithms. Rather than labeled points, they take as input
37- similarity judgments on tuples of data points, for instance pairs of similar
38- and dissimilar points. Refer to the documentation of each algorithm for its
39- particular form of input data.
11+ getting_started
4012
4113.. toctree ::
42- :maxdepth: 1
43-
44- metric_learn.itml
45- metric_learn.lsml
46- metric_learn.sdml
47- metric_learn.rca
48- metric_learn.mmc
49-
50- Note that each weakly-supervised algorithm has a supervised version of the form
51- `*_Supervised ` where similarity constraints are generated from
52- the labels information and passed to the underlying algorithm.
53-
54- Each metric learning algorithm supports the following methods:
55-
56- - ``fit(...) ``, which learns the model.
57- - ``transformer() ``, which returns a transformation matrix
58- :math: `L \in \mathbb {R}^{D \times d}`, which can be used to convert a
59- data matrix :math: `X \in \mathbb {R}^{n \times d}` to the
60- :math: `D`-dimensional learned metric space :math: `X L^{\top }`,
61- in which standard Euclidean distances may be used.
62- - ``transform(X) ``, which applies the aforementioned transformation.
63- - ``metric() ``, which returns a Mahalanobis matrix
64- :math: `M = L^{\top }L` such that distance between vectors ``x `` and
65- ``y `` can be computed as :math: `\left (x-y\right )M\left (x-y\right )`.
66-
67-
68- Installation and Setup
69- ======================
70-
71- Run ``pip install metric-learn `` to download and install from PyPI.
14+ :maxdepth: 2
7215
73- Alternately, download the source repository and run:
16+ user_guide
7417
75- - ``python setup.py install `` for default installation.
76- - ``python setup.py test `` to run all tests.
77-
78- **Dependencies **
79-
80- - Python 2.7+, 3.4+
81- - numpy, scipy, scikit-learn
82- - (for running the examples only: matplotlib)
18+ .. toctree ::
19+ :maxdepth: 2
8320
84- ** Notes **
21+ Package Overview < metric_learn >
8522
86- If a recent version of the Shogun Python modular (``modshogun ``) library
87- is available, the LMNN implementation will use the fast C++ version from
88- there. The two implementations differ slightly, and the C++ version is
89- more complete.
23+ .. toctree ::
24+ :maxdepth: 2
9025
91- Navigation
92- ----------
26+ auto_examples/index
9327
9428:ref: `genindex ` | :ref: `modindex ` | :ref: `search `
9529
96- .. toctree ::
97- :maxdepth: 4
98- :hidden:
99-
100- Package Overview <metric_learn >
101-
10230.. |PyPI version | image :: https://badge.fury.io/py/metric-learn.svg
10331 :target: http://badge.fury.io/py/metric-learn
10432.. |License | image :: http://img.shields.io/:license-mit-blue.svg?style=flat
0 commit comments