Skip to content

[MRG] Release 0.5 #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a460ce8
version 0.5.0b
rflamary Aug 29, 2018
8babe1b
update doc
rflamary Aug 29, 2018
4d32e6d
complete releases.md
rflamary Aug 29, 2018
3bc0420
aupdate release
rflamary Aug 29, 2018
f12153c
update documentation examples
rflamary Aug 29, 2018
1ec01f0
add notebooks from new examples
rflamary Aug 29, 2018
1d68c01
remove double smooth in doc
rflamary Aug 29, 2018
f51c6ab
update exmaple bary 1D for better notebook
rflamary Aug 29, 2018
827e840
add badge pepy
rflamary Sep 21, 2018
462f8ff
typo readme
rflamary Sep 21, 2018
697bd55
https badge
rflamary Sep 21, 2018
9fb56be
Merge branch 'master' into prV0.5
rflamary Sep 24, 2018
ae1ede4
update doc+notebooks for convolutional
rflamary Sep 24, 2018
ca08b78
deprecate ot.gpu and remove OTDA classes from it
rflamary Sep 24, 2018
67c98a6
merge doc
rflamary Sep 24, 2018
c8c397b
removed unused import
rflamary Sep 24, 2018
5bb13e4
do code coverage in travis
rflamary Sep 24, 2018
eea946b
remove old externals
rflamary Sep 24, 2018
057bb89
Revert "remove old externals"
rflamary Sep 24, 2018
6a69edd
correct typo deprecated function
rflamary Sep 24, 2018
c531fba
update contibution.md
rflamary Sep 25, 2018
c18f737
merge with new gpu stuff
rflamary Sep 28, 2018
287c4c0
update realease.md
rflamary Sep 28, 2018
49af122
correction bug merge ot.gpu.da
rflamary Sep 28, 2018
eaa05d1
cleanup tests with plot
rflamary Sep 28, 2018
642fd5b
speedup tests
rflamary Sep 28, 2018
84022d1
add coveragerc for better coverage estimation in ravis
rflamary Sep 28, 2018
b697757
update releases.md
rflamary Oct 3, 2018
27f0a9f
small release edit
rflamary Oct 3, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]

omit=
ot/externals/*
ot/externals/funcsigs.py
ot/gpu/*
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ before_script: # configure a headless display to test plot generation
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install flake8 pytest
- pip install flake8 pytest pytest-cov
- pip install .
# command to run tests + check syntax style
script:
- python setup.py develop
- flake8 examples/ ot/ test/
- python -m pytest -v test/
- python -m pytest -v test/ --cov=ot
# - py.test ot test
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GitHub, clone, and develop on a branch. Steps:
a copy of the code under your GitHub user account. For more details on
how to fork a repository see [this guide](https://help.github.com/articles/fork-a-repo/).

2. Clone your fork of the scikit-learn repo from your GitHub account to your local disk:
2. Clone your fork of the POT repo from your GitHub account to your local disk:

```bash
$ git clone git@github.com:YourLogin/POT.git
Expand Down Expand Up @@ -84,7 +84,7 @@ following rules before you submit a pull request:
example script in the ``examples/`` folder. Have a look at other
examples for reference. Examples should demonstrate why the new
functionality is useful in practice and, if possible, compare it
to other methods available in scikit-learn.
to other methods available in POT.

- Documentation and high-coverage tests are necessary for enhancements to be
accepted. Bug-fixes or new features should be provided with
Expand Down Expand Up @@ -145,7 +145,7 @@ following rules before submitting:
See [Creating and highlighting code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks).

- Please include your operating system type and version number, as well
as your Python, scikit-learn, numpy, and scipy versions. This information
as your Python, POT, numpy, and scipy versions. This information
can be found by running the following code snippet:

```python
Expand All @@ -165,8 +165,8 @@ following rules before submitting:
New contributor tips
--------------------

A great way to start contributing to scikit-learn is to pick an item
from the list of [Easy issues](https://github.com/scikit-learn/scikit-learn/issues?labels=Easy)
A great way to start contributing to POT is to pick an item
from the list of [Easy issues](https://github.com/rflamary/POT/issues?labels=Easy)
in the issue tracker. Resolving these issues allow you to start
contributing to the project without much prior knowledge. Your
assistance in this area will be greatly appreciated by the more
Expand Down Expand Up @@ -201,4 +201,4 @@ method does to the data and a figure (coming from an example)
illustrating it.


This Contrubution guide is strongly inpired by the one of the [scikit-learn](https://github.com/scikit-learn/scikit-learn) team.
This Contribution guide is strongly inpired by the one of the [scikit-learn](https://github.com/scikit-learn/scikit-learn) team.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Anaconda Cloud](https://anaconda.org/conda-forge/pot/badges/version.svg)](https://anaconda.org/conda-forge/pot)
[![Build Status](https://travis-ci.org/rflamary/POT.svg?branch=master)](https://travis-ci.org/rflamary/POT)
[![Documentation Status](https://readthedocs.org/projects/pot/badge/?version=latest)](http://pot.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://pepy.tech/badge/pot)](https://pepy.tech/project/pot)
[![Anaconda downloads](https://anaconda.org/conda-forge/pot/badges/downloads.svg)](https://anaconda.org/conda-forge/pot)
[![License](https://anaconda.org/conda-forge/pot/badges/license.svg)](https://github.com/rflamary/POT/blob/master/LICENSE)

Expand Down Expand Up @@ -79,7 +80,7 @@ Note that for easier access the module is name ot instead of pot.

Some sub-modules require additional dependences which are discussed below

* **ot.dr** (Wasserstein dimensionality rediuction) depends on autograd and pymanopt that can be installed with:
* **ot.dr** (Wasserstein dimensionality reduction) depends on autograd and pymanopt that can be installed with:
```
pip install pymanopt autograd
```
Expand Down
59 changes: 59 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# POT Releases


## 0.5.0 Year 2
*Sep 2018*

POT is 2 years old! This release brings numerous new features to the
toolbox as listed below but also several bug correction.

Among the new features, we can highlight a [non-regularized Gromov-Wasserstein
solver](https://github.com/rflamary/POT/blob/master/notebooks/plot_gromov.ipynb),
a new [greedy variant of sinkhorn](https://pot.readthedocs.io/en/latest/all.html#ot.bregman.greenkhorn),
[non-regularized](https://pot.readthedocs.io/en/latest/all.html#ot.lp.barycenter),
[convolutional (2D)](https://github.com/rflamary/POT/blob/master/notebooks/plot_convolutional_barycenter.ipynb)
and [free support](https://github.com/rflamary/POT/blob/master/notebooks/plot_free_support_barycenter.ipynb)
Wasserstein barycenters and [smooth](https://github.com/rflamary/POT/blob/prV0.5/notebooks/plot_OT_1D_smooth.ipynb)
and [stochastic](https://pot.readthedocs.io/en/latest/all.html#ot.stochastic.sgd_entropic_regularization)
implementation of entropic OT.

POT 0.5 also comes with a rewriting of ot.gpu using the cupy framework instead of
the unmaintained cudamat. Note that while we tried to keed changes to the
minimum, the OTDA classes were deprecated. If you are happy with the cudamat
implementation, we recommend you stay with stable release 0.4 for now.

The code quality has also improved with 92% code coverage in tests that is now
printed to the log in the Travis builds. The documentation has also been
greatly improved with new modules and examples/notebooks.

This new release is so full of new stuff and corrections thanks to the old
and new POT contributors (you can see the list in the [readme](https://github.com/rflamary/POT/blob/master/README.md)).

#### Features

* Add non regularized Gromov-Wasserstein solver (PR #41)
* Linear OT mapping between empirical distributions and 90\% test coverage (PR #42)
* Add log parameter in class EMDTransport and SinkhornLpL1Transport (PR #44)
* Add Markdown format for Pipy (PR #45)
* Test for Python 3.5 and 3.6 on Travis (PR #46)
* Non regularized Wasserstein barycenter with scipy linear solver and/or cvxopt (PR #47)
* Rename dataset functions to be more sklearn compliant (PR #49)
* Smooth and sparse Optimal transport implementation with entropic and quadratic regularization (PR #50)
* Stochastic OT in the dual and semi-dual (PR #52 and PR #62)
* Free support barycenters (PR #56)
* Speed-up Sinkhorn function (PR #57 and PR #58)
* Add convolutional Wassersein barycenters for 2D images (PR #64)
* Add Greedy Sinkhorn variant (Greenkhorn) (PR #66)
* Big ot.gpu update with cupy implementation (instead of un-maintained cudamat) (PR #67)

#### Deprecation

Deprecated OTDA Classes were removed from ot.da and ot.gpu for version 0.5
(PR #48 and PR #67). The deprecation message has been for a year here since
0.4 and it is time to pull the plug.

#### Closed issues

* Issue #35 : remove import plot from ot/__init__.py (See PR #41)
* Issue #43 : Unusable parameter log for EMDTransport (See PR #44)
* Issue #55 : UnicodeDecodeError: 'ascii' while installing with pip


## 0.4 Community edition
*15 Sep 2017*

Expand Down
2 changes: 1 addition & 1 deletion docs/cache_nbrun
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"plot_otda_mapping_colors_images.ipynb": "4f0587a00a3c082799a75a0ed36e9ce1", "plot_optim_OTreg.ipynb": "481801bb0d133ef350a65179cf8f739a", "plot_otda_color_images.ipynb": "d047d635f4987c81072383241590e21f", "plot_WDA.ipynb": "27f8de4c6d7db46497076523673eedfb", "plot_otda_linear_mapping.ipynb": "a472c767abe82020e0a58125a528785c", "plot_OT_L1_vs_L2.ipynb": "5d565b8aaf03be4309eba731127851dc", "plot_barycenter_1D.ipynb": "6063193f9ac87517acced2625edb9a54", "plot_otda_classes.ipynb": "39087b6e98217851575f2271c22853a4", "plot_otda_d2.ipynb": "e6feae588103f2a8fab942e5f4eff483", "plot_otda_mapping.ipynb": "2f1ebbdc0f855d9e2b7adf9edec24d25", "plot_gromov.ipynb": "24f2aea489714d34779521f46d5e2c47", "plot_compute_emd.ipynb": "f5cd71cad882ec157dc8222721e9820c", "plot_OT_1D.ipynb": "b5348bdc561c07ec168a1622e5af4b93", "plot_gromov_barycenter.ipynb": "953e5047b886ec69ec621ec52f5e21d1", "plot_otda_semi_supervised.ipynb": "f6dfb02ba2bbd939408ffcd22a3b007c", "plot_OT_2D_samples.ipynb": "07dbc14859fa019a966caa79fa0825bd", "plot_barycenter_lp_vs_entropic.ipynb": "51833e8c76aaedeba9599ac7a30eb357"}
{"plot_otda_mapping_colors_images.ipynb": "4f0587a00a3c082799a75a0ed36e9ce1", "plot_optim_OTreg.ipynb": "481801bb0d133ef350a65179cf8f739a", "plot_barycenter_1D.ipynb": "5f6fb8aebd8e2e91ebc77c923cb112b3", "plot_stochastic.ipynb": "e2c520150378ae4635f74509f687fa01", "plot_WDA.ipynb": "27f8de4c6d7db46497076523673eedfb", "plot_otda_linear_mapping.ipynb": "a472c767abe82020e0a58125a528785c", "plot_OT_1D_smooth.ipynb": "3a059103652225a0c78ea53895cf79e5", "plot_OT_L1_vs_L2.ipynb": "5d565b8aaf03be4309eba731127851dc", "plot_otda_color_images.ipynb": "d047d635f4987c81072383241590e21f", "plot_otda_classes.ipynb": "39087b6e98217851575f2271c22853a4", "plot_otda_d2.ipynb": "e6feae588103f2a8fab942e5f4eff483", "plot_otda_mapping.ipynb": "2f1ebbdc0f855d9e2b7adf9edec24d25", "plot_gromov.ipynb": "24f2aea489714d34779521f46d5e2c47", "plot_compute_emd.ipynb": "f5cd71cad882ec157dc8222721e9820c", "plot_OT_1D.ipynb": "b5348bdc561c07ec168a1622e5af4b93", "plot_gromov_barycenter.ipynb": "953e5047b886ec69ec621ec52f5e21d1", "plot_free_support_barycenter.ipynb": "246dd2feff4b233a4f1a553c5a202fdc", "plot_convolutional_barycenter.ipynb": "a72bb3716a1baaffd81ae267a673f9b6", "plot_otda_semi_supervised.ipynb": "f6dfb02ba2bbd939408ffcd22a3b007c", "plot_OT_2D_samples.ipynb": "07dbc14859fa019a966caa79fa0825bd", "plot_barycenter_lp_vs_entropic.ipynb": "51833e8c76aaedeba9599ac7a30eb357"}
5 changes: 0 additions & 5 deletions docs/source/all.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ ot.bregman

.. automodule:: ot.bregman
:members:

ot.smooth
-----
.. automodule:: ot.smooth
:members:

ot.smooth
-----
Expand Down
Binary file modified docs/source/auto_examples/auto_examples_jupyter.zip
Binary file not shown.
Binary file modified docs/source/auto_examples/auto_examples_python.zip
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 88 additions & 8 deletions docs/source/auto_examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,46 @@ This is a gallery of all the POT example files.

/auto_examples/plot_optim_OTreg

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Illustration of 2D Wasserstein barycenters if discributions that are weighted sum of diracs.">

.. only:: html

.. figure:: /auto_examples/images/thumb/sphx_glr_plot_free_support_barycenter_thumb.png

:ref:`sphx_glr_auto_examples_plot_free_support_barycenter.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/auto_examples/plot_free_support_barycenter

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the computation of EMD, Sinkhorn and smooth OT plans and their visuali...">

.. only:: html

.. figure:: /auto_examples/images/thumb/sphx_glr_plot_OT_1D_smooth_thumb.png

:ref:`sphx_glr_auto_examples_plot_OT_1D_smooth.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/auto_examples/plot_OT_1D_smooth

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example is designed to show how to use the Gromov-Wassertsein distance computation in POT....">
Expand Down Expand Up @@ -107,6 +147,26 @@ This is a gallery of all the POT example files.

/auto_examples/plot_compute_emd

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example is designed to illustrate how the Convolutional Wasserstein Barycenter function of...">

.. only:: html

.. figure:: /auto_examples/images/thumb/sphx_glr_plot_convolutional_barycenter_thumb.png

:ref:`sphx_glr_auto_examples_plot_convolutional_barycenter.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/auto_examples/plot_convolutional_barycenter

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip=" ">
Expand Down Expand Up @@ -149,13 +209,13 @@ This is a gallery of all the POT example files.

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example presents a way of transferring colors between two image with Optimal Transport as ...">
<div class="sphx-glr-thumbcontainer" tooltip="This example is designed to show how to use the stochatic optimization algorithms for descrete ...">

.. only:: html

.. figure:: /auto_examples/images/thumb/sphx_glr_plot_otda_color_images_thumb.png
.. figure:: /auto_examples/images/thumb/sphx_glr_plot_stochastic_thumb.png

:ref:`sphx_glr_auto_examples_plot_otda_color_images.py`
:ref:`sphx_glr_auto_examples_plot_stochastic.py`

.. raw:: html

Expand All @@ -165,17 +225,17 @@ This is a gallery of all the POT example files.
.. toctree::
:hidden:

/auto_examples/plot_otda_color_images
/auto_examples/plot_stochastic

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="OT for domain adaptation with image color adaptation [6] with mapping estimation [8].">
<div class="sphx-glr-thumbcontainer" tooltip="This example presents a way of transferring colors between two image with Optimal Transport as ...">

.. only:: html

.. figure:: /auto_examples/images/thumb/sphx_glr_plot_otda_mapping_colors_images_thumb.png
.. figure:: /auto_examples/images/thumb/sphx_glr_plot_otda_color_images_thumb.png

:ref:`sphx_glr_auto_examples_plot_otda_mapping_colors_images.py`
:ref:`sphx_glr_auto_examples_plot_otda_color_images.py`

.. raw:: html

Expand All @@ -185,7 +245,7 @@ This is a gallery of all the POT example files.
.. toctree::
:hidden:

/auto_examples/plot_otda_mapping_colors_images
/auto_examples/plot_otda_color_images

.. raw:: html

Expand All @@ -207,6 +267,26 @@ This is a gallery of all the POT example files.

/auto_examples/plot_barycenter_1D

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="OT for domain adaptation with image color adaptation [6] with mapping estimation [8].">

.. only:: html

.. figure:: /auto_examples/images/thumb/sphx_glr_plot_otda_mapping_colors_images_thumb.png

:ref:`sphx_glr_auto_examples_plot_otda_mapping_colors_images.py`

.. raw:: html

</div>


.. toctree::
:hidden:

/auto_examples/plot_otda_mapping_colors_images

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example presents how to use MappingTransport to estimate at the same time both the couplin...">
Expand Down
Loading