diff options
-rw-r--r-- | docs/source/readme.rst | 81 |
1 files changed, 42 insertions, 39 deletions
diff --git a/docs/source/readme.rst b/docs/source/readme.rst index 6d98dc5..4f6af01 100644 --- a/docs/source/readme.rst +++ b/docs/source/readme.rst @@ -39,6 +39,8 @@ It provides the following solvers: - Screening Sinkhorn Algorithm for OT [26]. - JCPOT algorithm for multi-source domain adaptation with target shift [27]. +- Partial Wasserstein and Gromov-Wasserstein (exact [29] and entropic + [3] formulations). Some demonstrations (both in Python and Jupyter Notebook format) are available in the examples folder. @@ -51,12 +53,12 @@ POT using the following bibtex reference: :: - @misc{flamary2017pot, - title={POT Python Optimal Transport library}, - author={Flamary, R{'e}mi and Courty, Nicolas}, - url={https://github.com/rflamary/POT}, - year={2017} - } + @misc{flamary2017pot, + title={POT Python Optimal Transport library}, + author={Flamary, R{'e}mi and Courty, Nicolas}, + url={https://github.com/rflamary/POT}, + year={2017} + } Installation ------------ @@ -78,19 +80,19 @@ be installed prior to installing POT. This can be done easily with :: - pip install numpy cython + pip install numpy cython You can install the toolbox through PyPI with: :: - pip install POT + pip install POT or get the very latest version by downloading it and then running: :: - python setup.py install --user # for user install (no root) + python setup.py install --user # for user install (no root) Anaconda installation with conda-forge ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -101,7 +103,7 @@ required dependencies: :: - conda install -c conda-forge pot + conda install -c conda-forge pot Post installation check ^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,7 +113,7 @@ without errors: .. code:: python - import ot + import ot Note that for easier access the module is name ot instead of pot. @@ -124,9 +126,9 @@ below - **ot.dr** (Wasserstein dimensionality reduction) depends on autograd and pymanopt that can be installed with: -:: + :: - pip install pymanopt autograd + pip install pymanopt autograd - **ot.gpu** (GPU accelerated OT) depends on cupy that have to be installed following instructions on `this @@ -142,36 +144,36 @@ Short examples - Import the toolbox -.. code:: python + .. code:: python - import ot + import ot - Compute Wasserstein distances -.. code:: python + .. code:: python - # a,b are 1D histograms (sum to 1 and positive) - # M is the ground cost matrix - Wd=ot.emd2(a,b,M) # exact linear program - Wd_reg=ot.sinkhorn2(a,b,M,reg) # entropic regularized OT - # if b is a matrix compute all distances to a and return a vector + # a,b are 1D histograms (sum to 1 and positive) + # M is the ground cost matrix + Wd=ot.emd2(a,b,M) # exact linear program + Wd_reg=ot.sinkhorn2(a,b,M,reg) # entropic regularized OT + # if b is a matrix compute all distances to a and return a vector - Compute OT matrix -.. code:: python + .. code:: python - # a,b are 1D histograms (sum to 1 and positive) - # M is the ground cost matrix - T=ot.emd(a,b,M) # exact linear program - T_reg=ot.sinkhorn(a,b,M,reg) # entropic regularized OT + # a,b are 1D histograms (sum to 1 and positive) + # M is the ground cost matrix + T=ot.emd(a,b,M) # exact linear program + T_reg=ot.sinkhorn(a,b,M,reg) # entropic regularized OT - Compute Wasserstein barycenter -.. code:: python + .. code:: python - # A is a n*d matrix containing d 1D histograms - # M is the ground cost matrix - ba=ot.barycenter(A,M,reg) # reg is regularization parameter + # A is a n*d matrix containing d 1D histograms + # M is the ground cost matrix + ba=ot.barycenter(A,M,reg) # reg is regularization parameter Examples and Notebooks ~~~~~~~~~~~~~~~~~~~~~~ @@ -282,11 +284,11 @@ References [1] Bonneel, N., Van De Panne, M., Paris, S., & Heidrich, W. (2011, December). `Displacement interpolation using Lagrangian mass transport <https://people.csail.mit.edu/sparis/publi/2011/sigasia/Bonneel_11_Displacement_Interpolation.pdf>`__. -In ACM Transactions on Graphics (TOG) (Vol. 30, No. 6, p. 158). ACM. +In ACM Transactions on Graphics (TOG) (Vol. 30, No. 6, p. 158). ACM. [2] Cuturi, M. (2013). `Sinkhorn distances: Lightspeed computation of optimal transport <https://arxiv.org/pdf/1306.0895.pdf>`__. In Advances -in Neural Information Processing Systems (pp. 2292-2300). +in Neural Information Processing Systems (pp. 2292-2300). [3] Benamou, J. D., Carlier, G., Cuturi, M., Nenna, L., & Peyré, G. (2015). `Iterative Bregman projections for regularized transportation @@ -410,14 +412,15 @@ Shift <http://proceedings.mlr.press/v89/redko19a.html>`__, Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics (AISTATS) 22, 2019. -[28] Caffarelli, L. A., McCann, R. J. (2020). [Free boundaries in -optimal transport and Monge-Ampere obstacle problems] -(http://www.math.toronto.edu/~mccann/papers/annals2010.pdf), Annals of -mathematics, 673-730. +[28] Caffarelli, L. A., McCann, R. J. (2020). `Free boundaries in +optimal transport and Monge-Ampere obstacle +problems <http://www.math.toronto.edu/~mccann/papers/annals2010.pdf>`__, +Annals of mathematics, 673-730. -[29] Chapel, L., Alaya, M., Gasso, G. (2019). [Partial -Gromov-Wasserstein with Applications on Positive-Unlabeled Learning"] -(https://arxiv.org/abs/2002.08276), arXiv preprint arXiv:2002.08276. +[29] Chapel, L., Alaya, M., Gasso, G. (2019). `Partial +Gromov-Wasserstein with Applications on Positive-Unlabeled +Learning <https://arxiv.org/abs/2002.08276>`__, arXiv preprint +arXiv:2002.08276. .. |PyPI version| image:: https://badge.fury.io/py/POT.svg :target: https://badge.fury.io/py/POT |