Skip to content

Commit 0820e51

Browse files
committed
releases + readme + docs update
1 parent 21bf86b commit 0820e51

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ POT provides the following generic OT solvers (links to examples):
5555
* [Co-Optimal Transport](https://pythonot.github.io/auto_examples/others/plot_COOT.html) [49] and
5656
[unbalanced Co-Optimal Transport](https://pythonot.github.io/auto_examples/others/plot_learning_weights_with_COOT.html) [71].
5757
* Fused unbalanced Gromov-Wasserstein [70].
58+
* [Optimal Transport Barycenters for Generic Costs](https://pythonot.github.io/auto_examples/barycenters/plot_free_support_barycenter_generic_cost.html) [74]
59+
* [Barycenters between Gaussian Mixture Models](https://pythonot.github.io/auto_examples/barycenters/plot_gmm_barycenter.html) [69, 74]
5860

5961
POT provides the following Machine Learning related solvers:
6062

RELEASES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
- Automatic PR labeling and release file update check (PR #704)
99
- Reorganize sub-module `ot/lp/__init__.py` into separate files (PR #714)
1010
- Implement fixed-point solver for OT barycenters with generic cost functions
11-
(generalizes `ot.lp.free_support_barycenter`). (PR #715)
11+
(generalizes `ot.lp.free_support_barycenter`), with example. (PR #715)
12+
- Implement fixed-point solver for barycenters between GMMs (PR #715), with example.
1213

1314
#### Closed issues
1415
- Fixed `ot.mapping` solvers which depended on deprecated `cvxpy` `ECOS` solver (PR #692, Issue #668)

examples/barycenters/plot_gmm_barycenter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Bures-Wasserstein manifold), and to compute barycenters with respect to the
1717
2-Wasserstein distance between measures in :math:`\mathcal{P}(\mathcal{N})`: a
1818
gaussian mixture is a finite combination of Diracs on specific gaussians, and
19-
two mixtures are compared with the 2-Wasserstein distance on this space with
19+
two mixtures are compared with the 2-Wasserstein distance on this space, where
2020
ground cost the squared Bures distance between gaussians.
2121
2222
[69] Delon, J., & Desolneux, A. (2020). A Wasserstein-type distance in the space

ot/lp/_barycenter_solvers.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ def free_support_barycenter_generic_costs(
458458
- :math:`Y_k` (m_k, d_k) is the k-th measure support
459459
(`measure_locations[k]`),
460460
- :math:`b_k` (m_k) is the k-th measure weights (`measure_weights[k]`),
461-
- :math:`c_k: \mathbb{R}^{n\times d}\times\mathbb{R}^{m_k\times d_k} \rightarrow \mathbb{R}_+^{n\times m_k}` is the k-th cost function (which computes the pairwise cost matrix)
461+
- :math:`c_k: \mathbb{R}^{n\times d}\times\mathbb{R}^{m_k\times d_k}
462+
\rightarrow \mathbb{R}_+^{n\times m_k}` is the k-th cost function
463+
(which computes the pairwise cost matrix)
462464
- :math:`\mathcal{T}_{c_k}(X, a, Y_k, b)` is the OT cost between the barycenter measure and the k-th measure with respect to the cost :math:`c_k`:
463465
464466
.. math::
@@ -475,18 +477,19 @@ def free_support_barycenter_generic_costs(
475477
476478
The algorithm requires a given ground barycenter function `B` which computes
477479
(broadcasted of `n`) solutions of the following minimisation problem given
478-
:math:`(Y_1, \cdots, Y_K) \in
479-
\mathbb{R}^{n\times d_1}\times\cdots\times\mathbb{R}^{n\times d_K}`:
480+
:math:`(Y_1, \cdots, Y_K) \in \mathbb{R}^{n\times
481+
d_1}\times\cdots\times\mathbb{R}^{n\times d_K}`:
480482
481483
.. math::
482484
B(y_1, \cdots, y_K) = \mathrm{argmin}_{x \in \mathbb{R}^d} \sum_{k=1}^K c_k(x, y_k),
483485
484486
where :math:`c_k(x, y_k) \in \mathbb{R}_+` is the cost between the points
485-
:math:`x` and :math:`y_k`. The function :math:`B:\mathbb{R}^{d_1}\times
486-
\cdots\times\mathbb{R}^{d_K} \longrightarrow \mathbb{R}^d` is an input to
487-
this function, and for certain costs it can be computed explicitly of
488-
through a numerical solver. The input function B takes a list of K arrays of
489-
shape (n, d_k) and returns an array of shape (n, d).
487+
:math:`x` and :math:`y_k`. The function :math:`B:\mathbb{R}^{n\times
488+
d_1}\times \cdots\times\mathbb{R}^{n\times d_K} \longrightarrow
489+
\mathbb{R}^{n\times d}` is an input to this function, and for certain costs
490+
it can be computed explicitly of through a numerical solver. The input
491+
function B takes a list of K arrays of shape (n, d_k) and returns an array
492+
of shape (n, d).
490493
491494
This function implements [74] Algorithm 2, which generalises [20] and [43]
492495
to general costs and includes convergence guarantees, including for discrete
@@ -526,8 +529,6 @@ def free_support_barycenter_generic_costs(
526529
log containing the exit status, list of iterations and list of
527530
displacements if log is True.
528531
529-
.. _references-free-support-barycenter-generic-costs:
530-
531532
References
532533
----------
533534
.. [74] Tanguy, Eloi and Delon, Julie and Gozlan, Nathaël (2024). Computing
@@ -543,8 +544,10 @@ def free_support_barycenter_generic_costs(
543544
544545
See Also
545546
--------
546-
ot.lp.free_support_barycenter : Free support solver for the case where :math:`c_k(x,y) = \|x-y\|_2^2`.
547-
ot.lp.generalized_free_support_barycenter : Free support solver for the case where :math:`c_k(x,y) = \|P_kx-y\|_2^2` with :math:`P_k` linear.
547+
ot.lp.free_support_barycenter : Free support solver for the case where
548+
:math:`c_k(x,y) = \|x-y\|_2^2`. ot.lp.generalized_free_support_barycenter :
549+
Free support solver for the case where :math:`c_k(x,y) = \|P_kx-y\|_2^2`
550+
with :math:`P_k` linear.
548551
"""
549552
nx = get_backend(X_init, measure_locations[0])
550553
K = len(measure_locations)

0 commit comments

Comments
 (0)