Skip to content

Commit 3c25646

Browse files
committed
update doc
1 parent 29f1f15 commit 3c25646

File tree

4 files changed

+155
-34
lines changed

4 files changed

+155
-34
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help :
1111
@echo " remove - remove the package (local user)"
1212
@echo " sremove - remove the package (system with sudo)"
1313
@echo " clean - remove any temporary files"
14-
@echo " notebook - launch ipython notebook"
14+
@echo " notebook - launch ipython notebook"
1515
build :
1616
$(PYTHON) setup.py build
1717

@@ -33,11 +33,14 @@ sremove :
3333

3434
clean :
3535
$(PYTHON) setup.py clean
36-
36+
3737
uploadpypi:
3838
python setup.py register
3939
python setup.py sdist upload -r pypi
4040

41+
rdoc:
42+
pandoc pandoc --from=markdown --to=rst --output=docs/source/readme.rst README.md
43+
4144

4245
notebook :
4346
ipython notebook --matplotlib=inline --notebook-dir=examples/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It provides the following solvers:
1212
* Bregman projections for Wasserstein barycenter [3] and unmixing [4].
1313
* Optimal transport for domain adaptation with group lasso regularization [5]
1414
* Conditional gradient [6] and Generalized conditional gradient for regularized OT [7].
15-
* Joint OT matix and mapping etsimation [8].
15+
* Joint OT matrix and mapping etsimation [8].
1616

1717
Some demonstrations (both in Python and Jupyter Notebook format) are available in the examples folder.
1818

docs/source/index.rst

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@
66
POT: Python Optimal Transport
77
=============================
88

9-
10-
This open source Python library provide several solvers for optimization problems related to Optimal Transport for signal, image processing and machine learning.
11-
12-
It provides the following solvers:
13-
14-
* OT solver for the linear program/ Earth Movers Distance [1].
15-
* Entropic regularization OT solver with Sinkhorn Knopp Algorithm [2].
16-
* Bregman projections for Wasserstein barycenter [3] and unmixing [4].
17-
* Optimal transport for domain adaptation with group lasso regularization [5]
18-
* Conditional gradient [6] and Generalized conditional gradient for regularized OT [7].
19-
20-
Some demonstrations (both in Python and Jupyter Notebook format) are available in the examples folder.
21-
22-
239
Contents
2410
--------
2511

@@ -30,23 +16,8 @@ Contents
3016
all
3117
examples
3218

33-
34-
References
35-
----------
36-
37-
[1] Bonneel, N., Van De Panne, M., Paris, S., & Heidrich, W. (2011, December). Displacement interpolation using Lagrangian mass transport. In ACM Transactions on Graphics (TOG) (Vol. 30, No. 6, p. 158). ACM.
38-
39-
[2] Cuturi, M. (2013). Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems (pp. 2292-2300).
40-
41-
[3] Benamou, J. D., Carlier, G., Cuturi, M., Nenna, L., & Peyré, G. (2015). Iterative Bregman projections for regularized transportation problems. SIAM Journal on Scientific Computing, 37(2), A1111-A1138.
42-
43-
[4] S. Nakhostin, N. Courty, R. Flamary, D. Tuia, T. Corpetti, Supervised planetary unmixing with optimal transport, Whorkshop on Hyperspectral Image and Signal Processing : Evolution in Remote Sensing (WHISPERS), 2016.
44-
45-
[5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, "Optimal Transport for Domain Adaptation," in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1
46-
47-
[6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882.
48-
49-
[7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized conditional gradient: analysis of convergence and applications. arXiv preprint arXiv:1510.06567.
19+
.. include:: ../readme.rst
20+
:start-line: 5
5021

5122

5223
Indices and tables

docs/source/readme.rst

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
POT: Python Optimal Transport
2+
=============================
3+
4+
|Documentation Status|
5+
6+
This open source Python library provide several solvers for optimization
7+
problems related to Optimal Transport for signal, image processing and
8+
machine learning.
9+
10+
It provides the following solvers:
11+
12+
- OT solver for the linear program/ Earth Movers Distance [1].
13+
- Entropic regularization OT solver with Sinkhorn Knopp Algorithm [2].
14+
- Bregman projections for Wasserstein barycenter [3] and unmixing [4].
15+
- Optimal transport for domain adaptation with group lasso
16+
regularization [5]
17+
- Conditional gradient [6] and Generalized conditional gradient for
18+
regularized OT [7].
19+
- Joint OT matrix and mapping etsimation [8].
20+
21+
Some demonstrations (both in Python and Jupyter Notebook format) are
22+
available in the examples folder.
23+
24+
Installation
25+
------------
26+
27+
The Library has been tested on Linux and MacOSX. It requires a C++
28+
compiler for using the EMD solver and rely on the following Python
29+
modules:
30+
31+
- Numpy (>=1.11)
32+
- Scipy (>=0.17)
33+
- Cython (>=0.23)
34+
- Matplotlib (>=1.5)
35+
36+
Under debian based linux the dependencies can be installed with
37+
38+
::
39+
40+
sudo apt-get install python-numpy python-scipy python-matplotlib cython
41+
42+
To install the library, you can install it locally (after downloading
43+
it) on you machine using
44+
45+
::
46+
47+
python setup.py install --user
48+
49+
The toolbox is also available on PyPI with a possibly slightly older
50+
version. You can install it with:
51+
52+
::
53+
54+
pip install POT
55+
56+
After a correct installation, you should be able to import the module
57+
without errors:
58+
59+
.. code:: python
60+
61+
import ot
62+
63+
Note that for easier access the module is name ot instead of pot.
64+
65+
Examples
66+
--------
67+
68+
The examples folder contain several examples and use case for the
69+
library. The full documentation is available on
70+
`Readthedocs <http://pot.readthedocs.io/>`__
71+
72+
Here is a list of the Python notebooks if you want a quick look:
73+
74+
- `1D optimal
75+
transport <https://github.com/rflamary/POT/blob/master/examples/Demo_1D_OT.ipynb>`__
76+
- `2D optimal transport on empirical
77+
distributions <https://github.com/rflamary/POT/blob/master/examples/Demo_2D_OT_samples.ipynb>`__
78+
- `1D Wasserstein
79+
barycenter <https://github.com/rflamary/POT/blob/master/examples/Demo_1D_barycenter.ipynb>`__
80+
- `OT with user provided
81+
regularization <https://github.com/rflamary/POT/blob/master/examples/Demo_Optim_OTreg.ipynb>`__
82+
- `Domain adaptation with optimal
83+
transport <https://github.com/rflamary/POT/blob/master/examples/Demo_2D_OT_DomainAdaptation.ipynb>`__
84+
- `Color transfer in
85+
images <https://github.com/rflamary/POT/blob/master/examples/Demo_Image_ColorAdaptation.ipynb>`__
86+
- `OT mapping estimation for domain
87+
adaptation <https://github.com/rflamary/POT/blob/master/examples/Demo_2D_OTmapping_DomainAdaptation.ipynb>`__
88+
89+
Acknowledgements
90+
----------------
91+
92+
The contributors to this library are:
93+
94+
- `Rémi Flamary <http://remi.flamary.com/>`__
95+
- `Nicolas Courty <http://people.irisa.fr/Nicolas.Courty/>`__
96+
- `Laetitia Chapel <http://people.irisa.fr/Laetitia.Chapel/>`__
97+
98+
This toolbox benefit a lot from open source research and we would like
99+
to thank the following persons for providing some code (in various
100+
languages):
101+
102+
- `Gabriel Peyré <http://gpeyre.github.io/>`__ (Wasserstein Barycenters
103+
in Matlab)
104+
- `Nicolas Bonneel <http://liris.cnrs.fr/~nbonneel/>`__ ( C++ code for
105+
EMD)
106+
- `Antoine Rolet <https://arolet.github.io/>`__ ( Mex file for EMD )
107+
- `Marco Cuturi <http://marcocuturi.net/>`__ (Sinkhorn Knopp in
108+
Matlab/Cuda)
109+
110+
References
111+
----------
112+
113+
[1] Bonneel, N., Van De Panne, M., Paris, S., & Heidrich, W. (2011,
114+
December). Displacement interpolation using Lagrangian mass transport.
115+
In ACM Transactions on Graphics (TOG) (Vol. 30, No. 6, p. 158). ACM.
116+
117+
[2] Cuturi, M. (2013). Sinkhorn distances: Lightspeed computation of
118+
optimal transport. In Advances in Neural Information Processing Systems
119+
(pp. 2292-2300).
120+
121+
[3] Benamou, J. D., Carlier, G., Cuturi, M., Nenna, L., & Peyré, G.
122+
(2015). Iterative Bregman projections for regularized transportation
123+
problems. SIAM Journal on Scientific Computing, 37(2), A1111-A1138.
124+
125+
[4] S. Nakhostin, N. Courty, R. Flamary, D. Tuia, T. Corpetti,
126+
Supervised planetary unmixing with optimal transport, Whorkshop on
127+
Hyperspectral Image and Signal Processing : Evolution in Remote Sensing
128+
(WHISPERS), 2016.
129+
130+
[5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, "Optimal Transport
131+
for Domain Adaptation," in IEEE Transactions on Pattern Analysis and
132+
Machine Intelligence , vol.PP, no.99, pp.1-1
133+
134+
[6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014).
135+
Regularized discrete optimal transport. SIAM Journal on Imaging
136+
Sciences, 7(3), 1853-1882.
137+
138+
[7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized
139+
conditional gradient: analysis of convergence and applications. arXiv
140+
preprint arXiv:1510.06567.
141+
142+
[8] M. Perrot, N. Courty, R. Flamary, A. Habrard, "Mapping estimation
143+
for discrete optimal transport", Neural Information Processing Systems
144+
(NIPS), 2016.
145+
146+
.. |Documentation Status| image:: https://readthedocs.org/projects/pot/badge/?version=latest
147+
:target: http://pot.readthedocs.io/en/latest/?badge=latest

0 commit comments

Comments
 (0)