summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Flamary <remi.flamary@gmail.com>2020-05-05 10:28:03 +0200
committerGitHub <noreply@github.com>2020-05-05 10:28:03 +0200
commit94d5c8cc9046854f473d8e4526a3bcf214eb5411 (patch)
tree27c620db19e2a01b229f59dda3bdaa65ecac5307
parent0497d888884bf1749b7bb944a3f717baff35528e (diff)
parent20e10a6db35a567d2cc6d75ad659c7473d82d3a7 (diff)
Merge pull request #167 from PythonOT/doc_v0.7
[WIP] Reproducible example WDA and remove dense from doc
-rw-r--r--README.md2
-rw-r--r--RELEASES.md4
-rw-r--r--docs/source/readme.rst4
-rw-r--r--docs/source/releases.rst85
-rw-r--r--examples/others/plot_WDA.py8
-rw-r--r--ot/lp/__init__.py4
6 files changed, 95 insertions, 12 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/RELEASES.md b/RELEASES.md
index ee3ec15..adb7fc1 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 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](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 is now 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..b8cb48c 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)
@@ -434,7 +434,7 @@ 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
+[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.
diff --git a/docs/source/releases.rst b/docs/source/releases.rst
index 075108f..5a357f3 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 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 <https://github.com/PythonOT>`__ that now owns the main POT
+repository https://github.com/PythonOT/POT and the repository for the
+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
+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. 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 <auto_examples/index.html>`__. 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 readthedocs.
+
+The CI framework has also been changed with a move from Travis to Github
+Action which allows to get faster tests on Windows, MacOS and Linux. We
+also now report our coverage on
+`Codecov.io <https://codecov.io/gh/PythonOT/POT>`__ 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 outputs of this
+`action <https://github.com/PythonOT/POT/actions?query=workflow%3A%22Build+dist+and+wheels%22>`__.
+This will allow simpler multi-platform releases from now on.
+
+In terms of new features we now have `OTDA Classes for unbalanced
+OT <https://pythonot.github.io/gen_modules/ot.da.html#ot.da.UnbalancedSinkhornTransport>`__,
+a new Domain adaptation class form `multi domain problems
+(JCPOT) <auto_examples/domain-adaptation/plot_otda_jcpot.html#sphx-glr-auto-examples-domain-adaptation-plot-otda-jcpot-py>`__,
+and several solvers to solve the `Partial Optimal
+Transport <auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html#sphx-glr-auto-examples-unbalanced-partial-plot-partial-wass-and-gromov-py>`__
+problems.
+
+This release is also the moment to thank all the POT contributors (old
+and new) for helping making POT such a nice 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*
diff --git a/examples/others/plot_WDA.py b/examples/others/plot_WDA.py
index 5e17433..bdfa57d 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.seed(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)
##############################################################################
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`.