Skip to content

Commit 316f8af

Browse files
converting to RST format, renaming to metric-learn
1 parent 2c21ea7 commit 316f8af

File tree

1 file changed

+42
-30
lines changed

1 file changed

+42
-30
lines changed

README.rst

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,66 @@
1-
[![Travis-CI Build Status](https://api.travis-ci.org/all-umass/metric_learn.svg?branch=master)](https://travis-ci.org/all-umass/metric_learn)
2-
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat)](http://badges.mit-license.org)
1+
|Travis-CI Build Status| |License|
32

4-
# metric_learn
3+
metric-learn
4+
=============
55

66
Metric Learning algorithms in Python.
77

88
**Algorithms**
99

10-
* Large Margin Nearest Neighbor (LMNN)
11-
* Information Theoretic Metric Learning (ITML)
12-
* Sparse Determinant Metric Learning (SDML)
13-
* Least Squares Metric Learning (LSML)
14-
* Neighborhood Components Analysis (NCA)
10+
- Large Margin Nearest Neighbor (LMNN)
11+
- Information Theoretic Metric Learning (ITML)
12+
- Sparse Determinant Metric Learning (SDML)
13+
- Least Squares Metric Learning (LSML)
14+
- Neighborhood Components Analysis (NCA)
1515

1616
**Dependencies**
1717

18-
* Python 2.6+
19-
* numpy, scipy, scikit-learn
20-
* (for running the examples only: matplotlib)
18+
- Python 2.6+
19+
- numpy, scipy, scikit-learn
20+
- (for running the examples only: matplotlib)
2121

2222
**Installation/Setup**
2323

24-
Run `python setup.py install` for default installation.
24+
Run ``python setup.py install`` for default installation.
2525

26-
Run `python setup.py test` to run all tests.
26+
Run ``python setup.py test`` to run all tests.
2727

2828
**Usage**
2929

30-
For full usage examples, see the `test` and `examples` directories.
30+
For full usage examples, see the ``test`` and ``examples`` directories.
3131

32-
Each metric is a subclass of `BaseMetricLearner`,
33-
which provides default implementations for the methods
34-
`metric`, `transformer`, and `transform`.
35-
Subclasses must provide an implementation for either `metric` or `transformer`.
32+
Each metric is a subclass of ``BaseMetricLearner``, which provides
33+
default implementations for the methods ``metric``, ``transformer``, and
34+
``transform``. Subclasses must provide an implementation for either
35+
``metric`` or ``transformer``.
3636

37-
For an instance of a metric learner named `foo` learning from a set of `d`-dimensional points,
38-
`foo.metric()` returns a `d` by `d` matrix `M` such that a distance between vectors `x` and `y` is
39-
expressed `(x-y).dot(M).dot(x-y)`.
37+
For an instance of a metric learner named ``foo`` learning from a set of
38+
``d``-dimensional points, ``foo.metric()`` returns a ``d`` by ``d``
39+
matrix ``M`` such that a distance between vectors ``x`` and ``y`` is
40+
expressed ``(x-y).dot(M).dot(x-y)``.
4041

41-
In the same scenario, `foo.transformer()` returns a `d` by `d` matrix `L` such that a vector `x`
42-
can be represented in the learned space as the vector `L.dot(x)`.
42+
In the same scenario, ``foo.transformer()`` returns a ``d`` by ``d``
43+
matrix ``L`` such that a vector ``x`` can be represented in the learned
44+
space as the vector ``L.dot(x)``.
4345

44-
For convenience, the function `foo.transform(X)` is provided for converting a matrix of points (`X`)
45-
into the learned space, in which standard Euclidean distance can be used.
46+
For convenience, the function ``foo.transform(X)`` is provided for
47+
converting a matrix of points (``X``) into the learned space, in which
48+
standard Euclidean distance can be used.
4649

4750
**Notes**
4851

49-
If a recent version of the Shogun Python modular (`modshogun`) library is available,
50-
the LMNN implementation will use the fast C++ version from there.
51-
The two implementations differ slightly, and the C++ version is more complete.
52+
If a recent version of the Shogun Python modular (``modshogun``) library
53+
is available, the LMNN implementation will use the fast C++ version from
54+
there. The two implementations differ slightly, and the C++ version is
55+
more complete.
5256

53-
*TODO: implement the rest of the methods on
54-
[this site](http://www.cs.cmu.edu/~liuy/distlearn.htm)*
57+
**TODO**
58+
59+
- implement the rest of the methods on `this site`_
60+
61+
.. _this site: http://www.cs.cmu.edu/~liuy/distlearn.htm
62+
63+
.. |Travis-CI Build Status| image:: https://api.travis-ci.org/all-umass/metric_learn.svg?branch=master
64+
:target: https://travis-ci.org/all-umass/metric_learn
65+
.. |License| image:: http://img.shields.io/:license-mit-blue.svg?style=flat
66+
:target: http://badges.mit-license.org

0 commit comments

Comments
 (0)