Skip to content

Commit 391ad39

Browse files
authored
Merge branch 'master' into dev
2 parents d1510ee + bc5fc11 commit 391ad39

32 files changed

+1905
-228
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ POT provides the following generic OT solvers (links to examples):
4040
* [Sampled solver of Gromov Wasserstein](https://pythonot.github.io/auto_examples/gromov/plot_gromov.html) for large-scale problem with any loss functions [33]
4141
* Non regularized [free support Wasserstein barycenters](https://pythonot.github.io/auto_examples/barycenters/plot_free_support_barycenter.html) [20].
4242
* [One dimensional Unbalanced OT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_UOT_1D.html) with KL relaxation and [barycenter](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_UOT_barycenter_1D.html) [10, 25]. Also [exact unbalanced OT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_unbalanced_ot.html) with KL and quadratic regularization and the [regularization path of UOT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_regpath.html) [41]
43-
* [Partial Wasserstein and Gromov-Wasserstein](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html) (exact [29] and entropic [3]
44-
formulations).
43+
* [Partial Wasserstein and Gromov-Wasserstein](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html) and [Partial Fused Gromov-Wasserstein](https://pythonot.github.io/auto_examples/gromov/plot_partial_fgw.html) (exact [29] and entropic [3] formulations).
4544
* [Sliced Wasserstein](https://pythonot.github.io/auto_examples/sliced-wasserstein/plot_variance.html) [31, 32] and Max-sliced Wasserstein [35] that can be used for gradient flows [36].
4645
* [Wasserstein distance on the circle](https://pythonot.github.io/auto_examples/plot_compute_wasserstein_circle.html) [44, 45]
4746
* [Spherical Sliced Wasserstein](https://pythonot.github.io/auto_examples/sliced-wasserstein/plot_variance_ssw.html) [46]
@@ -394,4 +393,8 @@ Artificial Intelligence.
394393

395394
[73] Séjourné, T., Vialard, F. X., & Peyré, G. (2022). [Faster Unbalanced Optimal Transport: Translation Invariant Sinkhorn and 1-D Frank-Wolfe](https://proceedings.mlr.press/v151/sejourne22a.html). In International Conference on Artificial Intelligence and Statistics (pp. 4995-5021). PMLR.
396395

397-
[74] Tanguy, Eloi and Delon, Julie and Gozlan, Nathaël (2024). [Computing Barycentres of Measures for Generic Transport Costs](https://arxiv.org/abs/2501.04016). arXiv preprint 2501.04016 (2024)
396+
[74] Chewi, S., Maunu, T., Rigollet, P., & Stromme, A. J. (2020). [Gradient descent algorithms for Bures-Wasserstein barycenters](https://proceedings.mlr.press/v125/chewi20a.html). In Conference on Learning Theory (pp. 1276-1304). PMLR.
397+
398+
[75] Altschuler, J., Chewi, S., Gerber, P. R., & Stromme, A. (2021). [Averaging on the Bures-Wasserstein manifold: dimension-free convergence of gradient descent](https://papers.neurips.cc/paper_files/paper/2021/hash/b9acb4ae6121c941324b2b1d3fac5c30-Abstract.html). Advances in Neural Information Processing Systems, 34, 22132-22145.
399+
400+
[76] Tanguy, Eloi and Delon, Julie and Gozlan, Nathaël (2024). [Computing Barycentres of Measures for Generic Transport Costs](https://arxiv.org/abs/2501.04016). arXiv preprint 2501.04016 (2024)

RELEASES.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@
1010
- Implement fixed-point solver for OT barycenters with generic cost functions
1111
(generalizes `ot.lp.free_support_barycenter`), with example. (PR #715)
1212
- Implement fixed-point solver for barycenters between GMMs (PR #715), with example.
13+
- Implement projected gradient descent solvers for entropic partial FGW (PR #702)
1314
- Fix documentation in the module `ot.gaussian` (PR #718)
15+
- Refactored `ot.bregman._convolutional` to improve readability (PR #709)
16+
- Added `ot.gaussian.bures_barycenter_gradient_descent` (PR #680)
17+
- Added `ot.gaussian.bures_wasserstein_distance` (PR #680)
18+
- `ot.gaussian.bures_wasserstein_distance` can be batched (PR #680)
1419

1520
#### Closed issues
1621
- Fixed `ot.mapping` solvers which depended on deprecated `cvxpy` `ECOS` solver (PR #692, Issue #668)
1722
- Fixed numerical errors in `ot.gmm` (PR #690, Issue #689)
1823
- Add version number to the documentation (PR #696)
1924
- Update doc for default regularization in `ot.unbalanced` sinkhorn solvers (Issue #691, PR #700)
2025
- Clean documentation for `gromov`, `lp` and `unbalanced` folders (PR #710)
26+
- Clean references in documentation (PR #722)
2127

2228
## 0.9.5
2329

@@ -46,7 +52,6 @@ This release also contains few bug fixes, concerning the support of any metric i
4652
- Notes before depreciating partial Gromov-Wasserstein function in `ot.partial` moved to ot.gromov (PR #663)
4753
- Create `ot.gromov._partial` add new features `loss_fun = "kl_loss"` and `symmetry=False` to all solvers while increasing speed + updating adequatly `ot.solvers` (PR #663)
4854
- Added `ot.unbalanced.sinkhorn_unbalanced_translation_invariant` (PR #676)
49-
- Refactored `ot.bregman._convolutional` to improve readability (PR #709)
5055

5156
#### Closed issues
5257
- Fixed `ot.gaussian` ignoring weights when computing means (PR #649, Issue #648)

examples/gromov/plot_barycenter_fgw.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def build_noisy_circular_graph(
9191
g = nx.Graph()
9292
g.add_nodes_from(list(range(N)))
9393
for i in range(N):
94-
noise = float(np.random.normal(mu, sigma, 1))
94+
noise = np.random.normal(mu, sigma, 1)[0]
9595
if with_noise:
9696
g.add_node(i, attr_name=math.sin((2 * i * math.pi / N)) + noise)
9797
else:
@@ -107,7 +107,7 @@ def build_noisy_circular_graph(
107107
if i == N - 1:
108108
g.add_edge(i, 1)
109109
g.add_edge(N, 0)
110-
noise = float(np.random.normal(mu, sigma, 1))
110+
noise = np.random.normal(mu, sigma, 1)[0]
111111
if with_noise:
112112
g.add_node(N, attr_name=math.sin((2 * N * math.pi / N)) + noise)
113113
else:
@@ -157,7 +157,7 @@ def graph_colors(nx_graph, vmin=0, vmax=7):
157157
plt.subplot(3, 3, i + 1)
158158
g = X0[i]
159159
pos = nx.kamada_kawai_layout(g)
160-
nx.draw(
160+
nx.draw_networkx(
161161
g,
162162
pos=pos,
163163
node_color=graph_colors(g, vmin=-1, vmax=1),
@@ -173,7 +173,7 @@ def graph_colors(nx_graph, vmin=0, vmax=7):
173173

174174
# %% We compute the barycenter using FGW. Structure matrices are computed using the shortest_path distance in the graph
175175
# Features distances are the euclidean distances
176-
Cs = [shortest_path(nx.adjacency_matrix(x).todense()) for x in X0]
176+
Cs = [shortest_path(nx.adjacency_matrix(x).toarray()) for x in X0]
177177
ps = [np.ones(len(x.nodes())) / len(x.nodes()) for x in X0]
178178
Ys = [
179179
np.array([v for (k, v) in nx.get_node_attributes(x, "attr_name").items()]).reshape(
@@ -199,7 +199,7 @@ def graph_colors(nx_graph, vmin=0, vmax=7):
199199

200200
# %%
201201
pos = nx.kamada_kawai_layout(bary)
202-
nx.draw(
202+
nx.draw_networkx(
203203
bary, pos=pos, node_color=graph_colors(bary, vmin=-1, vmax=1), with_labels=False
204204
)
205205
plt.suptitle("Barycenter", fontsize=20)

0 commit comments

Comments
 (0)