Skip to content

Commit bc5fc11

Browse files
authored
Clean references in documentation (#722)
* clean references in documentation * apply ruff-format change
1 parent d25770c commit bc5fc11

18 files changed

+143
-105
lines changed

RELEASES.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- Add version number to the documentation (PR #696)
2121
- Update doc for default regularization in `ot.unbalanced` sinkhorn solvers (Issue #691, PR #700)
2222
- Clean documentation for `gromov`, `lp` and `unbalanced` folders (PR #710)
23+
- Clean references in documentation (PR #722)
2324

2425
## 0.9.5
2526

ot/bregman/_barycenter.py

+1
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ def free_support_sinkhorn_barycenter(
336336
ot.bregman.sinkhorn : Entropic regularized OT solver
337337
ot.lp.free_support_barycenter : Barycenter solver based on Linear Programming
338338
339+
339340
.. _references-free-support-barycenter:
340341
References
341342
----------

ot/bregman/_sinkhorn.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ def sinkhorn(
129129
array([[0.36552929, 0.13447071],
130130
[0.13447071, 0.36552929]])
131131
132+
132133
.. _references-sinkhorn:
133134
References
134135
----------
135-
136136
.. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation
137137
of Optimal Transport, Advances in Neural Information Processing
138138
Systems (NIPS) 26, 2013
@@ -1460,6 +1460,7 @@ def sinkhorn_epsilon_scaling(
14601460
array([[0.36552929, 0.13447071],
14611461
[0.13447071, 0.36552929]])
14621462
1463+
14631464
.. _references-sinkhorn-epsilon-scaling:
14641465
References
14651466
----------

ot/da.py

+37-38
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ def sinkhorn_lpl1_mm(
132132
References
133133
----------
134134
.. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy,
135-
"Optimal Transport for Domain Adaptation," in IEEE
136-
Transactions on Pattern Analysis and Machine Intelligence ,
137-
vol.PP, no.99, pp.1-1
135+
"Optimal Transport for Domain Adaptation," in IEEE
136+
Transactions on Pattern Analysis and Machine Intelligence ,
137+
vol.PP, no.99, pp.1-1
138138
139139
.. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015).
140-
Generalized conditional gradient: analysis of convergence
141-
and applications. arXiv preprint arXiv:1510.06567.
140+
Generalized conditional gradient: analysis of convergence
141+
and applications. arXiv preprint arXiv:1510.06567.
142142
143143
See Also
144144
--------
@@ -276,12 +276,12 @@ def sinkhorn_l1l2_gl(
276276
References
277277
----------
278278
.. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy,
279-
"Optimal Transport for Domain Adaptation," in IEEE Transactions
280-
on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1
279+
"Optimal Transport for Domain Adaptation," in IEEE Transactions
280+
on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1
281281
282282
.. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015).
283-
Generalized conditional gradient: analysis of convergence and
284-
applications. arXiv preprint arXiv:1510.06567.
283+
Generalized conditional gradient: analysis of convergence and
284+
applications. arXiv preprint arXiv:1510.06567.
285285
286286
See Also
287287
--------
@@ -423,9 +423,9 @@ def emd_laplace(
423423
References
424424
----------
425425
.. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy,
426-
"Optimal Transport for Domain Adaptation," in IEEE
427-
Transactions on Pattern Analysis and Machine Intelligence,
428-
vol.PP, no.99, pp.1-1
426+
"Optimal Transport for Domain Adaptation," in IEEE
427+
Transactions on Pattern Analysis and Machine Intelligence,
428+
vol.PP, no.99, pp.1-1
429429
430430
.. [30] R. Flamary, N. Courty, D. Tuia, A. Rakotomamonjy,
431431
"Optimal transport with Laplacian regularization: Applications to domain adaptation and shape matching,"
@@ -743,8 +743,8 @@ def transform_labels(self, ys=None):
743743
References
744744
----------
745745
.. [27] Ievgen Redko, Nicolas Courty, Rémi Flamary, Devis Tuia
746-
"Optimal transport for multi-source domain adaptation under target shift",
747-
International Conference on Artificial Intelligence and Statistics (AISTATS), 2019.
746+
"Optimal transport for multi-source domain adaptation under target shift",
747+
International Conference on Artificial Intelligence and Statistics (AISTATS), 2019.
748748
749749
"""
750750
nx = self.nx
@@ -1073,8 +1073,8 @@ class LinearGWTransport(LinearTransport):
10731073
References
10741074
----------
10751075
.. [57] Delon, J., Desolneux, A., & Salmona, A. (2022). Gromov–Wasserstein
1076-
distances between Gaussian distributions. Journal of Applied Probability,
1077-
59(4), 1178-1198.
1076+
distances between Gaussian distributions. Journal of Applied Probability,
1077+
59(4), 1178-1198.
10781078
10791079
"""
10801080

@@ -1580,17 +1580,17 @@ class SinkhornLpl1Transport(BaseTransport):
15801580
References
15811581
----------
15821582
.. [1] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy,
1583-
"Optimal Transport for Domain Adaptation," in IEEE
1584-
Transactions on Pattern Analysis and Machine Intelligence ,
1585-
vol.PP, no.99, pp.1-1
1583+
"Optimal Transport for Domain Adaptation," in IEEE
1584+
Transactions on Pattern Analysis and Machine Intelligence ,
1585+
vol.PP, no.99, pp.1-1
15861586
15871587
.. [2] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015).
1588-
Generalized conditional gradient: analysis of convergence
1589-
and applications. arXiv preprint arXiv:1510.06567.
1588+
Generalized conditional gradient: analysis of convergence
1589+
and applications. arXiv preprint arXiv:1510.06567.
15901590
15911591
.. [6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014).
1592-
Regularized discrete optimal transport. SIAM Journal on Imaging
1593-
Sciences, 7(3), 1853-1882.
1592+
Regularized discrete optimal transport. SIAM Journal on Imaging
1593+
Sciences, 7(3), 1853-1882.
15941594
"""
15951595

15961596
def __init__(
@@ -1724,8 +1724,8 @@ class EMDLaplaceTransport(BaseTransport):
17241724
References
17251725
----------
17261726
.. [1] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy,
1727-
"Optimal Transport for Domain Adaptation," in IEEE Transactions
1728-
on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1
1727+
"Optimal Transport for Domain Adaptation," in IEEE Transactions
1728+
on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1
17291729
17301730
.. [2] R. Flamary, N. Courty, D. Tuia, A. Rakotomamonjy,
17311731
"Optimal transport with Laplacian regularization: Applications to domain adaptation and shape matching,"
@@ -1873,13 +1873,13 @@ class SinkhornL1l2Transport(BaseTransport):
18731873
References
18741874
----------
18751875
.. [1] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy,
1876-
"Optimal Transport for Domain Adaptation," in IEEE
1877-
Transactions on Pattern Analysis and Machine Intelligence ,
1878-
vol.PP, no.99, pp.1-1
1876+
"Optimal Transport for Domain Adaptation," in IEEE
1877+
Transactions on Pattern Analysis and Machine Intelligence ,
1878+
vol.PP, no.99, pp.1-1
18791879
18801880
.. [2] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015).
1881-
Generalized conditional gradient: analysis of convergence
1882-
and applications. arXiv preprint arXiv:1510.06567.
1881+
Generalized conditional gradient: analysis of convergence
1882+
and applications. arXiv preprint arXiv:1510.06567.
18831883
18841884
.. [6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014).
18851885
Regularized discrete optimal transport. SIAM Journal on Imaging
@@ -2352,14 +2352,13 @@ class JCPOTTransport(BaseTransport):
23522352
References
23532353
----------
23542354
.. [1] Ievgen Redko, Nicolas Courty, Rémi Flamary, Devis Tuia
2355-
"Optimal transport for multi-source domain adaptation under target shift",
2356-
International Conference on Artificial Intelligence and Statistics (AISTATS),
2357-
vol. 89, p.849-858, 2019.
2355+
"Optimal transport for multi-source domain adaptation under target shift",
2356+
International Conference on Artificial Intelligence and Statistics (AISTATS),
2357+
vol. 89, p.849-858, 2019.
23582358
23592359
.. [6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014).
2360-
Regularized discrete optimal transport. SIAM Journal on Imaging
2361-
Sciences, 7(3), 1853-1882.
2362-
2360+
Regularized discrete optimal transport. SIAM Journal on Imaging
2361+
Sciences, 7(3), 1853-1882.
23632362
23642363
"""
23652364

@@ -2524,8 +2523,8 @@ def transform_labels(self, ys=None):
25242523
References
25252524
----------
25262525
.. [27] Ievgen Redko, Nicolas Courty, Rémi Flamary, Devis Tuia
2527-
"Optimal transport for multi-source domain adaptation under target shift",
2528-
International Conference on Artificial Intelligence and Statistics (AISTATS), 2019.
2526+
"Optimal transport for multi-source domain adaptation under target shift",
2527+
International Conference on Artificial Intelligence and Statistics (AISTATS), 2019.
25292528
"""
25302529
nx = self.nx
25312530

ot/dr.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def wda(
208208
References
209209
----------
210210
.. [11] Flamary, R., Cuturi, M., Courty, N., & Rakotomamonjy, A. (2016).
211-
Wasserstein Discriminant Analysis. arXiv preprint arXiv:1608.08063.
211+
Wasserstein Discriminant Analysis. arXiv preprint arXiv:1608.08063.
212212
""" # noqa
213213

214214
if sinkhorn_method.lower() == "sinkhorn":
@@ -348,8 +348,8 @@ def projection_robust_wasserstein(
348348
References
349349
----------
350350
.. [32] Huang, M. , Ma S. & Lai L. (2021).
351-
A Riemannian Block Coordinate Descent Method for Computing
352-
the Projection Robust Wasserstein Distance, ICML.
351+
A Riemannian Block Coordinate Descent Method for Computing
352+
the Projection Robust Wasserstein Distance, ICML.
353353
""" # noqa
354354

355355
# initialization
@@ -489,7 +489,7 @@ def ewca(
489489
References
490490
----------
491491
.. [52] Collas, A., Vayer, T., Flamary, F., & Breloy, A. (2023).
492-
Entropic Wasserstein Component Analysis.
492+
Entropic Wasserstein Component Analysis.
493493
""" # noqa
494494
n, d = X.shape
495495
X = X - X.mean(0)

ot/gromov/_gw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,6 @@ def solve_gromov_linesearch(
911911
912912
913913
.. _references-solve-linesearch:
914-
915914
References
916915
----------
917916
.. [24] Vayer Titouan, Chapel Laetitia, Flamary Rémi, Tavenard Romain and Courty Nicolas
@@ -1293,6 +1292,7 @@ def fgw_barycenters(
12931292
- :math:`(\mathbf{M}_s)_s`: all distance matrices between the feature of the barycenter and the other features :math:`(dist(\mathbf{X}, \mathbf{Y}_s))_s` shape (`N`, `ns`)
12941293
- values used in convergence evaluation.
12951294
1295+
12961296
.. _references-fgw-barycenters:
12971297
References
12981298
----------

ot/gromov/_partial.py

+2
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ def partial_fused_gromov_wasserstein(
611611
log : dict
612612
Convergence information and loss.
613613
614+
614615
.. _references-partial-gromov-wasserstein:
615616
References
616617
----------
@@ -907,6 +908,7 @@ def partial_fused_gromov_wasserstein2(
907908
log : dict
908909
log dictionary returned only if `log` is `True`
909910
911+
910912
.. _references-partial-gromov-wasserstein2:
911913
References
912914
----------

ot/gromov/_semirelaxed.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,12 @@ def semirelaxed_fused_gromov_wasserstein(
474474
(ICML). 2019.
475475
476476
.. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty.
477-
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
478-
International Conference on Learning Representations (ICLR), 2022.
477+
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
478+
International Conference on Learning Representations (ICLR), 2022.
479479
480480
.. [62] H. Van Assel, C. Vincent-Cuaz, T. Vayer, R. Flamary, N. Courty.
481-
"Interpolating between Clustering and Dimensionality Reduction with
482-
Gromov-Wasserstein". NeurIPS 2023 Workshop OTML.
481+
"Interpolating between Clustering and Dimensionality Reduction with
482+
Gromov-Wasserstein". NeurIPS 2023 Workshop OTML.
483483
"""
484484
arr = [M, C1, C2]
485485
if p is not None:
@@ -688,12 +688,12 @@ def semirelaxed_fused_gromov_wasserstein2(
688688
(ICML). 2019.
689689
690690
.. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty.
691-
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
692-
International Conference on Learning Representations (ICLR), 2022.
691+
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
692+
International Conference on Learning Representations (ICLR), 2022.
693693
694694
.. [62] H. Van Assel, C. Vincent-Cuaz, T. Vayer, R. Flamary, N. Courty.
695-
"Interpolating between Clustering and Dimensionality Reduction with
696-
Gromov-Wasserstein". NeurIPS 2023 Workshop OTML.
695+
"Interpolating between Clustering and Dimensionality Reduction with
696+
Gromov-Wasserstein". NeurIPS 2023 Workshop OTML.
697697
"""
698698
# partial get_backend as the full one will be handled in gromov_wasserstein
699699
nx = get_backend(C1, C2)
@@ -1244,8 +1244,8 @@ def entropic_semirelaxed_fused_gromov_wasserstein(
12441244
References
12451245
----------
12461246
.. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty.
1247-
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
1248-
International Conference on Learning Representations (ICLR), 2022.
1247+
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
1248+
International Conference on Learning Representations (ICLR), 2022.
12491249
"""
12501250
arr = [M, C1, C2]
12511251
if p is not None:
@@ -1437,8 +1437,8 @@ def entropic_semirelaxed_fused_gromov_wasserstein2(
14371437
References
14381438
----------
14391439
.. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty.
1440-
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
1441-
International Conference on Learning Representations (ICLR), 2022.
1440+
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
1441+
International Conference on Learning Representations (ICLR), 2022.
14421442
"""
14431443
T, log_srfgw = entropic_semirelaxed_fused_gromov_wasserstein(
14441444
M,

ot/gromov/_utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,9 @@ def init_matrix_semirelaxed(C1, C2, p, loss_fun="square_loss", nx=None):
428428
"Gromov-Wasserstein averaging of kernel and distance matrices."
429429
International Conference on Machine Learning (ICML). 2016.
430430
431-
.. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty.
432-
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
433-
International Conference on Learning Representations (ICLR), 2022.
431+
.. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty.
432+
"Semi-relaxed Gromov-Wasserstein divergence and applications on graphs"
433+
International Conference on Learning Representations (ICLR), 2022.
434434
"""
435435
if nx is None:
436436
C1, C2, p = list_to_array(C1, C2, p)

ot/lp/_barycenter_solvers.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,13 @@ def free_support_barycenter(
227227
228228
229229
.. _references-free-support-barycenter:
230-
231230
References
232231
----------
233-
.. [20] Cuturi, Marco, and Arnaud Doucet. "Fast computation of Wasserstein barycenters." International Conference on Machine Learning. 2014.
232+
.. [20] Cuturi, Marco, and Arnaud Doucet. "Fast computation of Wasserstein barycenters."
233+
International Conference on Machine Learning. 2014.
234234
235-
.. [43] Álvarez-Esteban, Pedro C., et al. "A fixed-point approach to barycenters in Wasserstein space." Journal of Mathematical Analysis and Applications 441.2 (2016): 744-762.
235+
.. [43] Álvarez-Esteban, Pedro C., et al. "A fixed-point approach to barycenters in Wasserstein space."
236+
Journal of Mathematical Analysis and Applications 441.2 (2016): 744-762.
236237
237238
"""
238239

@@ -369,9 +370,12 @@ def generalized_free_support_barycenter(
369370
.. _references-generalized-free-support-barycenter:
370371
References
371372
----------
372-
.. [20] Cuturi, M. and Doucet, A.. "Fast computation of Wasserstein barycenters." International Conference on Machine Learning. 2014.
373+
.. [20] Cuturi, M. and Doucet, A.. "Fast computation of Wasserstein barycenters."
374+
International Conference on Machine Learning. 2014.
373375
374-
.. [42] Delon, J., Gozlan, N., and Saint-Dizier, A.. Generalized Wasserstein barycenters between probability measures living on different subspaces. arXiv preprint arXiv:2105.09755, 2021.
376+
.. [42] Delon, J., Gozlan, N., and Saint-Dizier, A.. Generalized Wasserstein barycenters
377+
between probability measures living on different subspaces.
378+
arXiv preprint arXiv:2105.09755, 2021.
375379
376380
"""
377381
nx = get_backend(*X_list, *a_list, *P_list)

ot/mapping.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ def joint_OT_mapping_kernel(
743743
References
744744
----------
745745
.. [8] M. Perrot, N. Courty, R. Flamary, A. Habrard,
746-
"Mapping estimation for discrete optimal transport",
747-
Neural Information Processing Systems (NIPS), 2016.
746+
"Mapping estimation for discrete optimal transport",
747+
Neural Information Processing Systems (NIPS), 2016.
748748
749749
See Also
750750
--------

0 commit comments

Comments
 (0)