Skip to content

Commit 036a514

Browse files
committed
Added intro page
1 parent 3d695b1 commit 036a514

File tree

3 files changed

+74
-2
lines changed

3 files changed

+74
-2
lines changed

doc/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
# dir menu entry, description, category)
277277
texinfo_documents = [
278278
(master_doc, 'metric-learn', u'metric-learn Documentation',
279-
author, 'metric-learn', 'One line description of project.',
279+
author, 'metric-learn', 'Metric Learning in Python.',
280280
'Miscellaneous'),
281281
]
282282

@@ -308,7 +308,7 @@
308308
# for small screen space, using the same theme for HTML and epub output is
309309
# usually not wise. This defaults to 'epub', a theme designed to save visual
310310
# space.
311-
#epub_theme = 'epub'
311+
epub_theme = 'epub'
312312

313313
# The language of the text. It defaults to the language option
314314
# or 'en' if the language is not set.

doc/source/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Contents:
1111
.. toctree::
1212
:maxdepth: 2
1313

14+
intro
15+
16+
1417

1518

1619
Indices and tables

doc/source/intro.rst

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Introduction
2+
=====================================
3+
4+
|Travis-CI Build Status| |License|
5+
6+
Metric Learning algorithms in Python.
7+
8+
**Algorithms**
9+
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)
15+
- Local Fisher Discriminant Analysis (LFDA)
16+
17+
**Dependencies**
18+
19+
- Python 2.6+
20+
- numpy, scipy, scikit-learn
21+
- (for running the examples only: matplotlib)
22+
23+
**Installation/Setup**
24+
25+
Run ``pip install metric-learn`` to download and install from PyPI.
26+
27+
Run ``python setup.py install`` for default installation.
28+
29+
Run ``python setup.py test`` to run all tests.
30+
31+
**Usage**
32+
33+
For full usage examples, see the ``test`` and ``examples`` directories.
34+
35+
Each metric is a subclass of ``BaseMetricLearner``, which provides
36+
default implementations for the methods ``metric``, ``transformer``, and
37+
``transform``. Subclasses must provide an implementation for either
38+
``metric`` or ``transformer``.
39+
40+
For an instance of a metric learner named ``foo`` learning from a set of
41+
``d``-dimensional points, ``foo.metric()`` returns a ``d`` by ``d``
42+
matrix ``M`` such that a distance between vectors ``x`` and ``y`` is
43+
expressed ``(x-y).dot(M).dot(x-y)``.
44+
45+
In the same scenario, ``foo.transformer()`` returns a ``d`` by ``d``
46+
matrix ``L`` such that a vector ``x`` can be represented in the learned
47+
space as the vector ``L.dot(x)``.
48+
49+
For convenience, the function ``foo.transform(X)`` is provided for
50+
converting a matrix of points (``X``) into the learned space, in which
51+
standard Euclidean distance can be used.
52+
53+
**Notes**
54+
55+
If a recent version of the Shogun Python modular (``modshogun``) library
56+
is available, the LMNN implementation will use the fast C++ version from
57+
there. The two implementations differ slightly, and the C++ version is
58+
more complete.
59+
60+
**TODO**
61+
62+
- implement the rest of the methods on `this site`_
63+
64+
.. _this site: http://www.cs.cmu.edu/~liuy/distlearn.htm
65+
66+
.. |Travis-CI Build Status| image:: https://api.travis-ci.org/all-umass/metric-learn.svg?branch=master
67+
:target: https://travis-ci.org/all-umass/metric-learn
68+
.. |License| image:: http://img.shields.io/:license-mit-blue.svg?style=flat
69+
:target: http://badges.mit-license.org

0 commit comments

Comments
 (0)