From 217ffbb73e15490935172f129e0ee51449f11bb6 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Tue, 5 May 2020 07:52:16 +0200 Subject: cleanup WDA example with proper seeds --- examples/others/plot_WDA.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/others/plot_WDA.py b/examples/others/plot_WDA.py index 5e17433..009d902 100644 --- a/examples/others/plot_WDA.py +++ b/examples/others/plot_WDA.py @@ -33,6 +33,8 @@ from ot.dr import wda, fda n = 1000 # nb samples in source and target datasets nz = 0.2 +np.random.RandomState(1) + # generate circle dataset t = np.random.rand(n) * 2 * np.pi ys = np.floor((np.arange(n) * 1.0 / n * 3)) + 1 @@ -88,7 +90,11 @@ reg = 1e0 k = 10 maxiter = 100 -Pwda, projwda = wda(xs, ys, p, reg, k, maxiter=maxiter) +P0 = np.random.randn(xs.shape[1], p) + +P0 /= np.sqrt(np.sum(P0**2, 0, keepdims=True)) + +Pwda, projwda = wda(xs, ys, p, reg, k, maxiter=maxiter, P0=P0) ############################################################################## -- cgit v1.2.3 From 8406caafaef8b3683d6a1d44917c404ba780f82c Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Tue, 5 May 2020 07:53:45 +0200 Subject: remove dense from ducumentation --- ot/lp/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ot/lp/__init__.py b/ot/lp/__init__.py index 50003ed..514a607 100644 --- a/ot/lp/__init__.py +++ b/ot/lp/__init__.py @@ -327,10 +327,6 @@ def emd2(a, b, M, processes=multiprocessing.cpu_count(), variables. Otherwise returns only the optimal transportation cost. return_matrix: boolean, optional (default=False) If True, returns the optimal transportation matrix in the log. - dense: boolean, optional (default=True) - If True, returns math:`\gamma` as a dense ndarray of shape (ns, nt). - Otherwise returns a sparse representation using scipy's `coo_matrix` - format. center_dual: boolean, optional (default=True) If True, centers the dual potential using function :ref:`center_ot_dual`. -- cgit v1.2.3 From dbd8f1485c03e4a680b73be59ab1590a59acbe16 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Tue, 5 May 2020 08:18:26 +0200 Subject: add release 0.7.0 in doc --- RELEASES.md | 4 +-- docs/source/readme.rst | 2 +- docs/source/releases.rst | 85 ++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 86 insertions(+), 5 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index dbcb4cb..699f9a6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,6 +1,6 @@ # Releases -## 0.7 +## 0.7.0 *May 2020* This is the new stable release for POT. We have a lot of changes in the documentation and several new features such as Partial OT, Unbalanced and Multi Sources OT Domain Adaptation and several bug fixes. One important change is that we have created a the GitHub organization [PythonOT](https://github.com/PythonOT) that now owns the main POT repository [https://github.com/PythonOT/POT](https://github.com/PythonOT/POT) and the repository for the new documentation hosted at [https://PythonOT.github.io/](https://PythonOT.github.io/). @@ -40,7 +40,7 @@ This release is also the moment to thank all the POT contributors (old and new) - Log bugs for Gromov-Wassertein solver (Issue #107, fixed in PR #108) - Weight issues in barycenter function (PR #106) -## 0.6 +## 0.6.0 *July 2019* This is the first official stable release of POT and this means a jump to 0.6! diff --git a/docs/source/readme.rst b/docs/source/readme.rst index c96f191..add0c00 100644 --- a/docs/source/readme.rst +++ b/docs/source/readme.rst @@ -121,7 +121,7 @@ The library has been tested on Linux, MacOSX and Windows. It requires a C++ compiler for building/installing the EMD solver and relies on the following Python modules: -- Numpy (>=1.11) +- Numpy (>=1.16) - Scipy (>=1.0) - Cython (>=0.23) - Matplotlib (>=1.5) diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 075108f..2bba432 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -1,8 +1,89 @@ Releases ======== -0.6 ---- +0.7.0 +----- + +*May 2020* + +This is the new stable release for POT. We have a lot of changes in the +documentation and several new features such as Partial OT, Unbalanced +and Multi Sources OT Domain Adaptation and several bug fixes. One +important change is that we have created a the GitHub organization +`PythonOT `__ that now owns the main POT +repository https://github.com/PythonOT/POT and the repository for the +new documentation hosted at https://PythonOT.github.io/. + +This is the first release where the Python 2.7 tests have been removed. +Most of the toolbox should still work but we do not offer support for +Python 2.7 and will close related Issues. + +A lot of changes have been done to the documentation that is now hosted +on https://PythonOT.github.io/ instead of readthedocs. It was a hard +choice but readthedocs did not allow us to run sphinx-gallery to update +our beautiful examples and it was a huge amount of work to maintain it. +The documentation is now automatically compiled and updated on merge. We +also removed the notebooks from the repository for space reason and also +because they are all available in the `example +gallery `__. Note +that now the output of the documentation build for each commit in the PR +is available to check that the doc builds correctly before merging which +was not possible with readthedoc. + +The CI framework has also been changed with a move from Travis to Github +Action which allows us to get faster tests on Windows, MacOS and Linux. +We also now report our coverage on +`Codecov.io `__ and we have a +reasonable 92% coverage. We also now generate wheels for a number of OS +and python versions at each merge in the master branch. They are +available as artifacts of this +`action `__. +This will allow simpler multi-platform releases from now on. + +In terms of new features we now have `OTDA Classes for unbalanced +OT `__, +a new Domain adaptation class form `multi domain problems +(JCPOT) `__, +and several solvers to solve the `Partial Optimal +Transport `__ +problems. + +This release is also the moment to thank all the POT contributors (old +and new) for helping making POT such a nice to use toolbox. A lot of +changes (also in the API) are comming for the next versions. + +Features +^^^^^^^^ + +- New documentation on https://PythonOT.github.io/ (PR #160, PR #143, + PR #144) +- Documentation build on CircleCI with sphinx-gallery (PR #145,PR #146, + #155) +- Run sphinx gallery in CI (PR #146) +- Remove notebooks from repo because available in doc (PR #156) +- Build wheels in CI (#157) +- Move from travis to GitHub Action for Windows, MacOS and Linux (PR + #148, PR #150) +- Partial Optimal Transport (PR#141 and PR #142) +- Laplace regularized OTDA (PR #140) +- Multi source DA with target shift (PR #137) +- Screenkhorn algorithm (PR #121) + +Closed issues +^^^^^^^^^^^^^ + +- Bug in Unbalanced OT example (Issue #127) +- Clean Cython output when calling setup.py clean (Issue #122) +- Various Macosx compilation problems (Issue #113, Issue #118, PR#130) +- EMD dimension mismatch (Issue #114, Fixed in PR #116) +- 2D barycenter bug for non square images (Issue #124, fixed in PR + #132) +- Bad value in EMD 1D (Issue #138, fixed in PR #139) +- Log bugs for Gromov-Wassertein solver (Issue #107, fixed in PR #108) +- Weight issues in barycenter function (PR #106) + +0.6.0 +----- *July 2019* -- cgit v1.2.3 From 2e50bd2cf410576c8e12c60043b0bcedb6151fad Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Tue, 5 May 2020 08:28:17 +0200 Subject: correct year in mccan reference for partial ot --- README.md | 2 +- docs/source/readme.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ee4cee..5626742 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,7 @@ You can also post bug reports and feature requests in Github issues. Make sure t [27] Redko I., Courty N., Flamary R., Tuia D. (2019). [Optimal Transport for Multi-source Domain Adaptation under Target 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. (2010). [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. diff --git a/docs/source/readme.rst b/docs/source/readme.rst index add0c00..b8cb48c 100644 --- a/docs/source/readme.rst +++ b/docs/source/readme.rst @@ -434,7 +434,7 @@ Shift `__, 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 +[28] Caffarelli, L. A., McCann, R. J. (2010). `Free boundaries in optimal transport and Monge-Ampere obstacle problems `__, Annals of mathematics, 673-730. -- cgit v1.2.3 From 2b31be018031cd23bfed6b76d75630a1a66520f1 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Tue, 5 May 2020 08:30:49 +0200 Subject: really reproducipble WDA example --- examples/others/plot_WDA.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/others/plot_WDA.py b/examples/others/plot_WDA.py index 009d902..bdfa57d 100644 --- a/examples/others/plot_WDA.py +++ b/examples/others/plot_WDA.py @@ -33,7 +33,7 @@ from ot.dr import wda, fda n = 1000 # nb samples in source and target datasets nz = 0.2 -np.random.RandomState(1) +np.random.seed(1) # generate circle dataset t = np.random.rand(n) * 2 * np.pi -- cgit v1.2.3 From 20e10a6db35a567d2cc6d75ad659c7473d82d3a7 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Tue, 5 May 2020 10:18:59 +0200 Subject: update release in doc --- docs/source/releases.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 2bba432..5a357f3 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -6,13 +6,13 @@ Releases *May 2020* -This is the new stable release for POT. We have a lot of changes in the -documentation and several new features such as Partial OT, Unbalanced -and Multi Sources OT Domain Adaptation and several bug fixes. One -important change is that we have created a the GitHub organization +This is the new stable release for POT. We made a lot of changes in the +documentation and added several new features such as Partial OT, +Unbalanced and Multi Sources OT Domain Adaptation and several bug fixes. +One important change is that we have created the GitHub organization `PythonOT `__ that now owns the main POT repository https://github.com/PythonOT/POT and the repository for the -new documentation hosted at https://PythonOT.github.io/. +new documentation is now hosted at https://PythonOT.github.io/. This is the first release where the Python 2.7 tests have been removed. Most of the toolbox should still work but we do not offer support for @@ -21,22 +21,22 @@ Python 2.7 and will close related Issues. A lot of changes have been done to the documentation that is now hosted on https://PythonOT.github.io/ instead of readthedocs. It was a hard choice but readthedocs did not allow us to run sphinx-gallery to update -our beautiful examples and it was a huge amount of work to maintain it. -The documentation is now automatically compiled and updated on merge. We +our beautiful examples and it was a huge amount of work to maintain. The +documentation is now automatically compiled and updated on merge. We also removed the notebooks from the repository for space reason and also because they are all available in the `example gallery `__. Note that now the output of the documentation build for each commit in the PR is available to check that the doc builds correctly before merging which -was not possible with readthedoc. +was not possible with readthedocs. The CI framework has also been changed with a move from Travis to Github -Action which allows us to get faster tests on Windows, MacOS and Linux. -We also now report our coverage on +Action which allows to get faster tests on Windows, MacOS and Linux. We +also now report our coverage on `Codecov.io `__ and we have a reasonable 92% coverage. We also now generate wheels for a number of OS -and python versions at each merge in the master branch. They are -available as artifacts of this +and Python versions at each merge in the master branch. They are +available as outputs of this `action `__. This will allow simpler multi-platform releases from now on. @@ -49,8 +49,8 @@ Transport