Skip to content

Commit 94d5c8c

Browse files
authored
Merge pull request #167 from PythonOT/doc_v0.7
[WIP] Reproducible example WDA and remove dense from doc
2 parents 0497d88 + 20e10a6 commit 94d5c8c

File tree

6 files changed

+95
-12
lines changed

6 files changed

+95
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ You can also post bug reports and feature requests in Github issues. Make sure t
258258

259259
[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.
260260

261-
[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.
261+
[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.
262262

263263
[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.
264264

RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Releases
22

3-
## 0.7
3+
## 0.7.0
44
*May 2020*
55

66
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)
4040
- Log bugs for Gromov-Wassertein solver (Issue #107, fixed in PR #108)
4141
- Weight issues in barycenter function (PR #106)
4242

43-
## 0.6
43+
## 0.6.0
4444
*July 2019*
4545

4646
This is the first official stable release of POT and this means a jump to 0.6!

docs/source/readme.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ The library has been tested on Linux, MacOSX and Windows. It requires a
121121
C++ compiler for building/installing the EMD solver and relies on the
122122
following Python modules:
123123

124-
- Numpy (>=1.11)
124+
- Numpy (>=1.16)
125125
- Scipy (>=1.0)
126126
- Cython (>=0.23)
127127
- Matplotlib (>=1.5)
@@ -434,7 +434,7 @@ Shift <http://proceedings.mlr.press/v89/redko19a.html>`__, Proceedings
434434
of the Twenty-Second International Conference on Artificial Intelligence
435435
and Statistics (AISTATS) 22, 2019.
436436

437-
[28] Caffarelli, L. A., McCann, R. J. (2020). `Free boundaries in
437+
[28] Caffarelli, L. A., McCann, R. J. (2010). `Free boundaries in
438438
optimal transport and Monge-Ampere obstacle
439439
problems <http://www.math.toronto.edu/~mccann/papers/annals2010.pdf>`__,
440440
Annals of mathematics, 673-730.

docs/source/releases.rst

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,89 @@
11
Releases
22
========
33

4-
0.6
5-
---
4+
0.7.0
5+
-----
6+
7+
*May 2020*
8+
9+
This is the new stable release for POT. We made a lot of changes in the
10+
documentation and added several new features such as Partial OT,
11+
Unbalanced and Multi Sources OT Domain Adaptation and several bug fixes.
12+
One important change is that we have created the GitHub organization
13+
`PythonOT <https://github.com/PythonOT>`__ that now owns the main POT
14+
repository https://github.com/PythonOT/POT and the repository for the
15+
new documentation is now hosted at https://PythonOT.github.io/.
16+
17+
This is the first release where the Python 2.7 tests have been removed.
18+
Most of the toolbox should still work but we do not offer support for
19+
Python 2.7 and will close related Issues.
20+
21+
A lot of changes have been done to the documentation that is now hosted
22+
on https://PythonOT.github.io/ instead of readthedocs. It was a hard
23+
choice but readthedocs did not allow us to run sphinx-gallery to update
24+
our beautiful examples and it was a huge amount of work to maintain. The
25+
documentation is now automatically compiled and updated on merge. We
26+
also removed the notebooks from the repository for space reason and also
27+
because they are all available in the `example
28+
gallery <auto_examples/index.html>`__. Note
29+
that now the output of the documentation build for each commit in the PR
30+
is available to check that the doc builds correctly before merging which
31+
was not possible with readthedocs.
32+
33+
The CI framework has also been changed with a move from Travis to Github
34+
Action which allows to get faster tests on Windows, MacOS and Linux. We
35+
also now report our coverage on
36+
`Codecov.io <https://codecov.io/gh/PythonOT/POT>`__ and we have a
37+
reasonable 92% coverage. We also now generate wheels for a number of OS
38+
and Python versions at each merge in the master branch. They are
39+
available as outputs of this
40+
`action <https://github.com/PythonOT/POT/actions?query=workflow%3A%22Build+dist+and+wheels%22>`__.
41+
This will allow simpler multi-platform releases from now on.
42+
43+
In terms of new features we now have `OTDA Classes for unbalanced
44+
OT <https://pythonot.github.io/gen_modules/ot.da.html#ot.da.UnbalancedSinkhornTransport>`__,
45+
a new Domain adaptation class form `multi domain problems
46+
(JCPOT) <auto_examples/domain-adaptation/plot_otda_jcpot.html#sphx-glr-auto-examples-domain-adaptation-plot-otda-jcpot-py>`__,
47+
and several solvers to solve the `Partial Optimal
48+
Transport <auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html#sphx-glr-auto-examples-unbalanced-partial-plot-partial-wass-and-gromov-py>`__
49+
problems.
50+
51+
This release is also the moment to thank all the POT contributors (old
52+
and new) for helping making POT such a nice toolbox. A lot of changes
53+
(also in the API) are comming for the next versions.
54+
55+
Features
56+
^^^^^^^^
57+
58+
- New documentation on https://PythonOT.github.io/ (PR #160, PR #143,
59+
PR #144)
60+
- Documentation build on CircleCI with sphinx-gallery (PR #145,PR #146,
61+
#155)
62+
- Run sphinx gallery in CI (PR #146)
63+
- Remove notebooks from repo because available in doc (PR #156)
64+
- Build wheels in CI (#157)
65+
- Move from travis to GitHub Action for Windows, MacOS and Linux (PR
66+
#148, PR #150)
67+
- Partial Optimal Transport (PR#141 and PR #142)
68+
- Laplace regularized OTDA (PR #140)
69+
- Multi source DA with target shift (PR #137)
70+
- Screenkhorn algorithm (PR #121)
71+
72+
Closed issues
73+
^^^^^^^^^^^^^
74+
75+
- Bug in Unbalanced OT example (Issue #127)
76+
- Clean Cython output when calling setup.py clean (Issue #122)
77+
- Various Macosx compilation problems (Issue #113, Issue #118, PR#130)
78+
- EMD dimension mismatch (Issue #114, Fixed in PR #116)
79+
- 2D barycenter bug for non square images (Issue #124, fixed in PR
80+
#132)
81+
- Bad value in EMD 1D (Issue #138, fixed in PR #139)
82+
- Log bugs for Gromov-Wassertein solver (Issue #107, fixed in PR #108)
83+
- Weight issues in barycenter function (PR #106)
84+
85+
0.6.0
86+
-----
687

788
*July 2019*
889

examples/others/plot_WDA.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
n = 1000 # nb samples in source and target datasets
3434
nz = 0.2
3535

36+
np.random.seed(1)
37+
3638
# generate circle dataset
3739
t = np.random.rand(n) * 2 * np.pi
3840
ys = np.floor((np.arange(n) * 1.0 / n * 3)) + 1
@@ -88,7 +90,11 @@
8890
k = 10
8991
maxiter = 100
9092

91-
Pwda, projwda = wda(xs, ys, p, reg, k, maxiter=maxiter)
93+
P0 = np.random.randn(xs.shape[1], p)
94+
95+
P0 /= np.sqrt(np.sum(P0**2, 0, keepdims=True))
96+
97+
Pwda, projwda = wda(xs, ys, p, reg, k, maxiter=maxiter, P0=P0)
9298

9399

94100
##############################################################################

ot/lp/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,6 @@ def emd2(a, b, M, processes=multiprocessing.cpu_count(),
327327
variables. Otherwise returns only the optimal transportation cost.
328328
return_matrix: boolean, optional (default=False)
329329
If True, returns the optimal transportation matrix in the log.
330-
dense: boolean, optional (default=True)
331-
If True, returns math:`\gamma` as a dense ndarray of shape (ns, nt).
332-
Otherwise returns a sparse representation using scipy's `coo_matrix`
333-
format.
334330
center_dual: boolean, optional (default=True)
335331
If True, centers the dual potential using function
336332
:ref:`center_ot_dual`.

0 commit comments

Comments
 (0)