Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9f51c14
example for log treatment in bregman.py
AdrienCorenflos May 8, 2020
a07330c
Improve doc
AdrienCorenflos Jul 14, 2020
d3292a8
Merge remote-tracking branch 'origin/master'
AdrienCorenflos Jul 14, 2020
dfa2c9d
Revert "example for log treatment in bregman.py"
AdrienCorenflos Jul 14, 2020
36377cc
Add comments by Flamary
AdrienCorenflos Jul 20, 2020
110f382
Delete repetitive description
AdrienCorenflos Jul 20, 2020
cbf6bf5
Added raw string to avoid pbs with backslashes
AdrienCorenflos Jul 20, 2020
22e7f6b
Implements sliced wasserstein
AdrienCorenflos Jul 20, 2020
7beac55
Merge branch 'master' into sliced_wasserstein
rflamary Jul 20, 2020
ba04ed6
Changed formatting of string for py3.5 support
AdrienCorenflos Jul 20, 2020
391df18
Merge remote-tracking branch 'origin/sliced_wasserstein' into sliced_…
AdrienCorenflos Jul 20, 2020
ca8364c
Docstest, expected 0.0 and not 0.
AdrienCorenflos Jul 20, 2020
2d893f2
Adressed comments by @rflamary
AdrienCorenflos Aug 4, 2020
7d9b920
No 3d plot here
AdrienCorenflos Aug 4, 2020
b68e2c2
add sliced to the docs
AdrienCorenflos Aug 4, 2020
a1309da
Merge branch 'master' into sliced_wasserstein
rflamary Aug 25, 2020
5c5c589
Merge branch 'master' into sliced_wasserstein
rflamary Aug 31, 2020
abeba45
Merge remote-tracking branch 'upstream/master' into sliced_wasserstein
AdrienCorenflos Aug 31, 2020
9a8edb5
Incorporate comments by @rflamary
AdrienCorenflos Aug 31, 2020
64fc3e1
Merge remote-tracking branch 'origin/sliced_wasserstein' into sliced_…
AdrienCorenflos Aug 31, 2020
5590a79
add link to pdf
rflamary Sep 4, 2020
1a718b2
Merge branch 'master' into sliced_wasserstein
rflamary Oct 22, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comments by Flamary
  • Loading branch information
AdrienCorenflos committed Jul 20, 2020
commit 36377ccb1d011fce081aea64a90f8f83710c9be5
16 changes: 8 additions & 8 deletions ot/lp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def emd(a, b, M, numItermax=100000, log=False, center_dual=True):

if np.any(~asel) or np.any(~bsel):
u, v = estimate_dual_null_weights(u, v, a, b, M)

result_code_string = check_result(result_code)
if log:
log = {}
Expand Down Expand Up @@ -389,7 +389,7 @@ def emd2(a, b, M, processes=multiprocessing.cpu_count(),
if log or return_matrix:
def f(b):
bsel = b != 0

G, cost, u, v, result_code = emd_c(a, b, M, numItermax)

if center_dual:
Expand Down Expand Up @@ -438,12 +438,7 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b=None
"""
Solves the free support (locations of the barycenters are optimized, not the weights) Wasserstein barycenter problem (i.e. the weighted Frechet mean for the 2-Wasserstein distance)

The function solves the Wasserstein barycenter problem when the barycenter measure is constrained to be supported on k atoms.
This problem is considered in [1] (Algorithm 2). There are two differences with the following codes:
- we do not optimize over the weights
- we do not do line search for the locations updates, we use i.e. theta = 1 in [1] (Algorithm 2). This can be seen as a discrete implementation of the fixed-point algorithm of [2] proposed in the continuous setting.

Formally we solve the following problem:
The function solves the Wasserstein barycenter problem when the barycenter measure is constrained to be supported on k atoms, formally:

.. math::
\min_X \sum_{i=1}^N w_i W_2^2(b, X, a_i, X_i)
Expand All @@ -455,6 +450,11 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b=None
- the :math:`X_i \in \mathbb{R}^{k_i, d}` are the empirical measures atoms locations
- :math:`b \in \mathbb{R}^{k}` is the desired weights vector of the barycenter

This problem is considered in [1] (Algorithm 2). There are two differences with the following codes:

- we do not optimize over the weights
- we do not do line search for the locations updates, we use i.e. theta = 1 in [1] (Algorithm 2). This can be seen as a discrete implementation of the fixed-point algorithm of [2] proposed in the continuous setting.

Parameters
----------
measures_locations : list of N (k_i,d) numpy.ndarray
Expand Down