diff --git a/RELEASES.md b/RELEASES.md index 745a7de67..e7a7fe187 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -15,6 +15,7 @@ - Add version number to the documentation (PR #696) - Update doc for default regularization in `ot.unbalanced` sinkhorn solvers (Issue #691, PR #700) - Clean documentation for `gromov`, `lp` and `unbalanced` folders (PR #710) +- Clean references in documentation (PR #722) ## 0.9.5 diff --git a/ot/bregman/_barycenter.py b/ot/bregman/_barycenter.py index 77f20f87d..89732f9df 100644 --- a/ot/bregman/_barycenter.py +++ b/ot/bregman/_barycenter.py @@ -336,6 +336,7 @@ def free_support_sinkhorn_barycenter( ot.bregman.sinkhorn : Entropic regularized OT solver ot.lp.free_support_barycenter : Barycenter solver based on Linear Programming + .. _references-free-support-barycenter: References ---------- diff --git a/ot/bregman/_sinkhorn.py b/ot/bregman/_sinkhorn.py index a288830d2..342ba02e8 100644 --- a/ot/bregman/_sinkhorn.py +++ b/ot/bregman/_sinkhorn.py @@ -129,10 +129,10 @@ def sinkhorn( array([[0.36552929, 0.13447071], [0.13447071, 0.36552929]]) + .. _references-sinkhorn: References ---------- - .. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation of Optimal Transport, Advances in Neural Information Processing Systems (NIPS) 26, 2013 @@ -1460,6 +1460,7 @@ def sinkhorn_epsilon_scaling( array([[0.36552929, 0.13447071], [0.13447071, 0.36552929]]) + .. _references-sinkhorn-epsilon-scaling: References ---------- diff --git a/ot/da.py b/ot/da.py index 7fce1b7eb..9cf1d39d4 100644 --- a/ot/da.py +++ b/ot/da.py @@ -132,13 +132,13 @@ def sinkhorn_lpl1_mm( References ---------- .. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, - "Optimal Transport for Domain Adaptation," in IEEE - Transactions on Pattern Analysis and Machine Intelligence , - vol.PP, no.99, pp.1-1 + "Optimal Transport for Domain Adaptation," in IEEE + Transactions on Pattern Analysis and Machine Intelligence , + vol.PP, no.99, pp.1-1 .. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). - Generalized conditional gradient: analysis of convergence - and applications. arXiv preprint arXiv:1510.06567. + Generalized conditional gradient: analysis of convergence + and applications. arXiv preprint arXiv:1510.06567. See Also -------- @@ -276,12 +276,12 @@ def sinkhorn_l1l2_gl( References ---------- .. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, - "Optimal Transport for Domain Adaptation," in IEEE Transactions - on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 + "Optimal Transport for Domain Adaptation," in IEEE Transactions + on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 .. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). - Generalized conditional gradient: analysis of convergence and - applications. arXiv preprint arXiv:1510.06567. + Generalized conditional gradient: analysis of convergence and + applications. arXiv preprint arXiv:1510.06567. See Also -------- @@ -423,9 +423,9 @@ def emd_laplace( References ---------- .. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, - "Optimal Transport for Domain Adaptation," in IEEE - Transactions on Pattern Analysis and Machine Intelligence, - vol.PP, no.99, pp.1-1 + "Optimal Transport for Domain Adaptation," in IEEE + Transactions on Pattern Analysis and Machine Intelligence, + vol.PP, no.99, pp.1-1 .. [30] R. Flamary, N. Courty, D. Tuia, A. Rakotomamonjy, "Optimal transport with Laplacian regularization: Applications to domain adaptation and shape matching," @@ -743,8 +743,8 @@ def transform_labels(self, ys=None): References ---------- .. [27] Ievgen Redko, Nicolas Courty, Rémi Flamary, Devis Tuia - "Optimal transport for multi-source domain adaptation under target shift", - International Conference on Artificial Intelligence and Statistics (AISTATS), 2019. + "Optimal transport for multi-source domain adaptation under target shift", + International Conference on Artificial Intelligence and Statistics (AISTATS), 2019. """ nx = self.nx @@ -1073,8 +1073,8 @@ class LinearGWTransport(LinearTransport): References ---------- .. [57] Delon, J., Desolneux, A., & Salmona, A. (2022). Gromov–Wasserstein - distances between Gaussian distributions. Journal of Applied Probability, - 59(4), 1178-1198. + distances between Gaussian distributions. Journal of Applied Probability, + 59(4), 1178-1198. """ @@ -1580,17 +1580,17 @@ class SinkhornLpl1Transport(BaseTransport): References ---------- .. [1] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, - "Optimal Transport for Domain Adaptation," in IEEE - Transactions on Pattern Analysis and Machine Intelligence , - vol.PP, no.99, pp.1-1 + "Optimal Transport for Domain Adaptation," in IEEE + Transactions on Pattern Analysis and Machine Intelligence , + vol.PP, no.99, pp.1-1 .. [2] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). - Generalized conditional gradient: analysis of convergence - and applications. arXiv preprint arXiv:1510.06567. + Generalized conditional gradient: analysis of convergence + and applications. arXiv preprint arXiv:1510.06567. .. [6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). - Regularized discrete optimal transport. SIAM Journal on Imaging - Sciences, 7(3), 1853-1882. + Regularized discrete optimal transport. SIAM Journal on Imaging + Sciences, 7(3), 1853-1882. """ def __init__( @@ -1724,8 +1724,8 @@ class EMDLaplaceTransport(BaseTransport): References ---------- .. [1] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, - "Optimal Transport for Domain Adaptation," in IEEE Transactions - on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 + "Optimal Transport for Domain Adaptation," in IEEE Transactions + on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 .. [2] R. Flamary, N. Courty, D. Tuia, A. Rakotomamonjy, "Optimal transport with Laplacian regularization: Applications to domain adaptation and shape matching," @@ -1873,13 +1873,13 @@ class SinkhornL1l2Transport(BaseTransport): References ---------- .. [1] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, - "Optimal Transport for Domain Adaptation," in IEEE - Transactions on Pattern Analysis and Machine Intelligence , - vol.PP, no.99, pp.1-1 + "Optimal Transport for Domain Adaptation," in IEEE + Transactions on Pattern Analysis and Machine Intelligence , + vol.PP, no.99, pp.1-1 .. [2] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). - Generalized conditional gradient: analysis of convergence - and applications. arXiv preprint arXiv:1510.06567. + Generalized conditional gradient: analysis of convergence + and applications. arXiv preprint arXiv:1510.06567. .. [6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). Regularized discrete optimal transport. SIAM Journal on Imaging @@ -2352,14 +2352,13 @@ class JCPOTTransport(BaseTransport): References ---------- .. [1] Ievgen Redko, Nicolas Courty, Rémi Flamary, Devis Tuia - "Optimal transport for multi-source domain adaptation under target shift", - International Conference on Artificial Intelligence and Statistics (AISTATS), - vol. 89, p.849-858, 2019. + "Optimal transport for multi-source domain adaptation under target shift", + International Conference on Artificial Intelligence and Statistics (AISTATS), + vol. 89, p.849-858, 2019. .. [6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). - Regularized discrete optimal transport. SIAM Journal on Imaging - Sciences, 7(3), 1853-1882. - + Regularized discrete optimal transport. SIAM Journal on Imaging + Sciences, 7(3), 1853-1882. """ @@ -2524,8 +2523,8 @@ def transform_labels(self, ys=None): References ---------- .. [27] Ievgen Redko, Nicolas Courty, Rémi Flamary, Devis Tuia - "Optimal transport for multi-source domain adaptation under target shift", - International Conference on Artificial Intelligence and Statistics (AISTATS), 2019. + "Optimal transport for multi-source domain adaptation under target shift", + International Conference on Artificial Intelligence and Statistics (AISTATS), 2019. """ nx = self.nx diff --git a/ot/dr.py b/ot/dr.py index c374c440c..4914e6b84 100644 --- a/ot/dr.py +++ b/ot/dr.py @@ -208,7 +208,7 @@ def wda( References ---------- .. [11] Flamary, R., Cuturi, M., Courty, N., & Rakotomamonjy, A. (2016). - Wasserstein Discriminant Analysis. arXiv preprint arXiv:1608.08063. + Wasserstein Discriminant Analysis. arXiv preprint arXiv:1608.08063. """ # noqa if sinkhorn_method.lower() == "sinkhorn": @@ -348,8 +348,8 @@ def projection_robust_wasserstein( References ---------- .. [32] Huang, M. , Ma S. & Lai L. (2021). - A Riemannian Block Coordinate Descent Method for Computing - the Projection Robust Wasserstein Distance, ICML. + A Riemannian Block Coordinate Descent Method for Computing + the Projection Robust Wasserstein Distance, ICML. """ # noqa # initialization @@ -489,7 +489,7 @@ def ewca( References ---------- .. [52] Collas, A., Vayer, T., Flamary, F., & Breloy, A. (2023). - Entropic Wasserstein Component Analysis. + Entropic Wasserstein Component Analysis. """ # noqa n, d = X.shape X = X - X.mean(0) diff --git a/ot/gaussian.py b/ot/gaussian.py index 002e69fb4..fa74093a2 100644 --- a/ot/gaussian.py +++ b/ot/gaussian.py @@ -566,8 +566,8 @@ def gaussian_gromov_wasserstein_distance(Cov_s, Cov_t, log=False): References ---------- .. [57] Delon, J., Desolneux, A., & Salmona, A. (2022). Gromov–Wasserstein - distances between Gaussian distributions. Journal of Applied Probability, - 59(4), 1178-1198. + distances between Gaussian distributions. Journal of Applied Probability, + 59(4), 1178-1198. """ nx = get_backend(Cov_s, Cov_t) @@ -630,8 +630,8 @@ def empirical_gaussian_gromov_wasserstein_distance(xs, xt, ws=None, wt=None, log References ---------- .. [57] Delon, J., Desolneux, A., & Salmona, A. (2022). Gromov–Wasserstein - distances between Gaussian distributions. Journal of Applied Probability, - 59(4), 1178-1198. + distances between Gaussian distributions. Journal of Applied Probability, + 59(4), 1178-1198. """ xs, xt = list_to_array(xs, xt) nx = get_backend(xs, xt) @@ -698,8 +698,8 @@ def gaussian_gromov_wasserstein_mapping( References ---------- .. [57] Delon, J., Desolneux, A., & Salmona, A. (2022). Gromov–Wasserstein - distances between Gaussian distributions. Journal of Applied Probability, - 59(4), 1178-1198. + distances between Gaussian distributions. Journal of Applied Probability, + 59(4), 1178-1198. """ nx = get_backend(mu_s, mu_t, Cov_s, Cov_t) @@ -788,12 +788,13 @@ def empirical_gaussian_gromov_wasserstein_mapping( b : (1, dt) array-like bias + .. _references-empirical_gaussian_gromov_wasserstein_mapping: References ---------- .. [57] Delon, J., Desolneux, A., & Salmona, A. (2022). Gromov–Wasserstein - distances between Gaussian distributions. Journal of Applied Probability, - 59(4), 1178-1198. + distances between Gaussian distributions. Journal of Applied Probability, + 59(4), 1178-1198. """ xs, xt = list_to_array(xs, xt) diff --git a/ot/gromov/_gw.py b/ot/gromov/_gw.py index 1c8de7b20..5a2e2eda9 100644 --- a/ot/gromov/_gw.py +++ b/ot/gromov/_gw.py @@ -911,7 +911,6 @@ def solve_gromov_linesearch( .. _references-solve-linesearch: - References ---------- .. [24] Vayer Titouan, Chapel Laetitia, Flamary Rémi, Tavenard Romain and Courty Nicolas @@ -1293,6 +1292,7 @@ def fgw_barycenters( - :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`) - values used in convergence evaluation. + .. _references-fgw-barycenters: References ---------- diff --git a/ot/gromov/_partial.py b/ot/gromov/_partial.py index b08f60174..8e8b2a617 100644 --- a/ot/gromov/_partial.py +++ b/ot/gromov/_partial.py @@ -611,6 +611,7 @@ def partial_fused_gromov_wasserstein( log : dict Convergence information and loss. + .. _references-partial-gromov-wasserstein: References ---------- @@ -907,6 +908,7 @@ def partial_fused_gromov_wasserstein2( log : dict log dictionary returned only if `log` is `True` + .. _references-partial-gromov-wasserstein2: References ---------- diff --git a/ot/gromov/_semirelaxed.py b/ot/gromov/_semirelaxed.py index 05ad8b25c..8c60b2569 100644 --- a/ot/gromov/_semirelaxed.py +++ b/ot/gromov/_semirelaxed.py @@ -474,12 +474,12 @@ def semirelaxed_fused_gromov_wasserstein( (ICML). 2019. .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. - "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" - International Conference on Learning Representations (ICLR), 2022. + "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" + International Conference on Learning Representations (ICLR), 2022. .. [62] H. Van Assel, C. Vincent-Cuaz, T. Vayer, R. Flamary, N. Courty. - "Interpolating between Clustering and Dimensionality Reduction with - Gromov-Wasserstein". NeurIPS 2023 Workshop OTML. + "Interpolating between Clustering and Dimensionality Reduction with + Gromov-Wasserstein". NeurIPS 2023 Workshop OTML. """ arr = [M, C1, C2] if p is not None: @@ -688,12 +688,12 @@ def semirelaxed_fused_gromov_wasserstein2( (ICML). 2019. .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. - "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" - International Conference on Learning Representations (ICLR), 2022. + "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" + International Conference on Learning Representations (ICLR), 2022. .. [62] H. Van Assel, C. Vincent-Cuaz, T. Vayer, R. Flamary, N. Courty. - "Interpolating between Clustering and Dimensionality Reduction with - Gromov-Wasserstein". NeurIPS 2023 Workshop OTML. + "Interpolating between Clustering and Dimensionality Reduction with + Gromov-Wasserstein". NeurIPS 2023 Workshop OTML. """ # partial get_backend as the full one will be handled in gromov_wasserstein nx = get_backend(C1, C2) @@ -1244,8 +1244,8 @@ def entropic_semirelaxed_fused_gromov_wasserstein( References ---------- .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. - "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" - International Conference on Learning Representations (ICLR), 2022. + "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" + International Conference on Learning Representations (ICLR), 2022. """ arr = [M, C1, C2] if p is not None: @@ -1437,8 +1437,8 @@ def entropic_semirelaxed_fused_gromov_wasserstein2( References ---------- .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. - "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" - International Conference on Learning Representations (ICLR), 2022. + "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" + International Conference on Learning Representations (ICLR), 2022. """ T, log_srfgw = entropic_semirelaxed_fused_gromov_wasserstein( M, diff --git a/ot/gromov/_utils.py b/ot/gromov/_utils.py index 79afaed36..4ae23d41d 100644 --- a/ot/gromov/_utils.py +++ b/ot/gromov/_utils.py @@ -428,9 +428,9 @@ def init_matrix_semirelaxed(C1, C2, p, loss_fun="square_loss", nx=None): "Gromov-Wasserstein averaging of kernel and distance matrices." International Conference on Machine Learning (ICML). 2016. - .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. - "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" - International Conference on Learning Representations (ICLR), 2022. + .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. + "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" + International Conference on Learning Representations (ICLR), 2022. """ if nx is None: C1, C2, p = list_to_array(C1, C2, p) diff --git a/ot/lp/_barycenter_solvers.py b/ot/lp/_barycenter_solvers.py index 8b64214d9..4779662e9 100644 --- a/ot/lp/_barycenter_solvers.py +++ b/ot/lp/_barycenter_solvers.py @@ -227,12 +227,13 @@ def free_support_barycenter( .. _references-free-support-barycenter: - References ---------- - .. [20] Cuturi, Marco, and Arnaud Doucet. "Fast computation of Wasserstein barycenters." International Conference on Machine Learning. 2014. + .. [20] Cuturi, Marco, and Arnaud Doucet. "Fast computation of Wasserstein barycenters." + International Conference on Machine Learning. 2014. - .. [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. + .. [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. """ @@ -369,9 +370,12 @@ def generalized_free_support_barycenter( .. _references-generalized-free-support-barycenter: References ---------- - .. [20] Cuturi, M. and Doucet, A.. "Fast computation of Wasserstein barycenters." International Conference on Machine Learning. 2014. + .. [20] Cuturi, M. and Doucet, A.. "Fast computation of Wasserstein barycenters." + International Conference on Machine Learning. 2014. - .. [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. + .. [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. """ nx = get_backend(*X_list, *a_list, *P_list) diff --git a/ot/mapping.py b/ot/mapping.py index 1ec55cb95..ea1917772 100644 --- a/ot/mapping.py +++ b/ot/mapping.py @@ -743,8 +743,8 @@ def joint_OT_mapping_kernel( References ---------- .. [8] M. Perrot, N. Courty, R. Flamary, A. Habrard, - "Mapping estimation for discrete optimal transport", - Neural Information Processing Systems (NIPS), 2016. + "Mapping estimation for discrete optimal transport", + Neural Information Processing Systems (NIPS), 2016. See Also -------- diff --git a/ot/optim.py b/ot/optim.py index ae8b0ba58..d94200cad 100644 --- a/ot/optim.py +++ b/ot/optim.py @@ -287,12 +287,14 @@ def line_search(cost, G, deltaG, Mi, cost_G, df_G, **kwargs): .. _references_gcg: References ---------- + .. [1] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). + Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882. - .. [1] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882. + .. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, "Optimal Transport for Domain Adaptation," + in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 - .. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, "Optimal Transport for Domain Adaptation," in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 - - .. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized conditional gradient: analysis of convergence and applications. arXiv preprint arXiv:1510.06567. + .. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized conditional gradient: + analysis of convergence and applications. arXiv preprint arXiv:1510.06567. See Also -------- @@ -492,8 +494,8 @@ def cg( .. _references-cg: References ---------- - - .. [1] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882. + .. [1] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). + Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882. See Also -------- @@ -616,10 +618,9 @@ def semirelaxed_cg( .. _references-cg: References ---------- - - .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. - "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" - International Conference on Learning Representations (ICLR), 2021. + .. [48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty. + "Semi-relaxed Gromov-Wasserstein divergence and applications on graphs" + International Conference on Learning Representations (ICLR), 2021. """ if nx is None: @@ -755,7 +756,6 @@ def partial_cg( .. _references-partial-cg: References ---------- - .. [29] Chapel, L., Alaya, M., Gasso, G. (2020). "Partial Optimal Transport with Applications on Positive-Unlabeled Learning". NeurIPS. @@ -885,10 +885,11 @@ def gcg( .. _references-gcg: References ---------- + .. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, "Optimal Transport for Domain Adaptation," + in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 - .. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, "Optimal Transport for Domain Adaptation," in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1 - - .. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized conditional gradient: analysis of convergence and applications. arXiv preprint arXiv:1510.06567. + .. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized conditional gradient: + analysis of convergence and applications. arXiv preprint arXiv:1510.06567. See Also -------- diff --git a/ot/partial.py b/ot/partial.py index 6b2304e08..f86175b10 100755 --- a/ot/partial.py +++ b/ot/partial.py @@ -113,8 +113,8 @@ def partial_wasserstein_lagrange( References ---------- .. [28] Caffarelli, L. A., & McCann, R. J. (2010) Free boundaries in - optimal transport and Monge-Ampere obstacle problems. Annals of - mathematics, 673-730. + optimal transport and Monge-Ampere obstacle problems. Annals of + mathematics, 673-730. See Also -------- @@ -498,8 +498,8 @@ def entropic_partial_wasserstein( References ---------- .. [3] Benamou, J. D., Carlier, G., Cuturi, M., Nenna, L., & Peyré, G. - (2015). Iterative Bregman projections for regularized transportation - problems. SIAM Journal on Scientific Computing, 37(2), A1111-A1138. + (2015). Iterative Bregman projections for regularized transportation + problems. SIAM Journal on Scientific Computing, 37(2), A1111-A1138. See Also -------- @@ -766,7 +766,7 @@ def partial_gromov_wasserstein( .. _references-partial-gromov-wasserstein: References ---------- - .. [29] Chapel, L., Alaya, M., Gasso, G. (2020). "Partial Optimal + .. [29] Chapel, L., Alaya, M., Gasso, G. (2020). "Partial Optimal Transport with Applications on Positive-Unlabeled Learning". NeurIPS. @@ -975,7 +975,7 @@ def partial_gromov_wasserstein2( .. _references-partial-gromov-wasserstein2: References ---------- - .. [29] Chapel, L., Alaya, M., Gasso, G. (2020). "Partial Optimal + .. [29] Chapel, L., Alaya, M., Gasso, G. (2020). "Partial Optimal Transport with Applications on Positive-Unlabeled Learning". NeurIPS. @@ -1098,7 +1098,7 @@ def entropic_partial_gromov_wasserstein( Returns ------- - :math: `gamma` : (dim_a, dim_b) ndarray + :math:`gamma` : ndarray, shape (dim_a, dim_b) Optimal transportation matrix for the given parameters log : dict log dictionary returned only if `log` is `True` diff --git a/ot/smooth.py b/ot/smooth.py index 266fddd53..9fbac6c73 100644 --- a/ot/smooth.py +++ b/ot/smooth.py @@ -576,11 +576,14 @@ def smooth_ot_dual( .. _references-smooth-ot-dual: References ---------- - .. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation of Optimal Transport, Advances in Neural Information Processing Systems (NIPS) 26, 2013 + .. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation of Optimal Transport, + Advances in Neural Information Processing Systems (NIPS) 26, 2013 - .. [17] Blondel, M., Seguy, V., & Rolet, A. (2018). Smooth and Sparse Optimal Transport. Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics (AISTATS). + .. [17] Blondel, M., Seguy, V., & Rolet, A. (2018). Smooth and Sparse Optimal Transport. + Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics (AISTATS). - .. [50] Liu, T., Puigcerver, J., & Blondel, M. (2023). Sparsity-constrained optimal transport. Proceedings of the Eleventh International Conference on Learning Representations (ICLR). + .. [50] Liu, T., Puigcerver, J., & Blondel, M. (2023). Sparsity-constrained optimal transport. + Proceedings of the Eleventh International Conference on Learning Representations (ICLR). See Also -------- @@ -707,11 +710,14 @@ def smooth_ot_semi_dual( .. _references-smooth-ot-semi-dual: References ---------- - .. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation of Optimal Transport, Advances in Neural Information Processing Systems (NIPS) 26, 2013 + .. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation of Optimal Transport, + Advances in Neural Information Processing Systems (NIPS) 26, 2013 - .. [17] Blondel, M., Seguy, V., & Rolet, A. (2018). Smooth and Sparse Optimal Transport. Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics (AISTATS). + .. [17] Blondel, M., Seguy, V., & Rolet, A. (2018). Smooth and Sparse Optimal Transport. + Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics (AISTATS). - .. [50] Liu, T., Puigcerver, J., & Blondel, M. (2023). Sparsity-constrained optimal transport. Proceedings of the Eleventh International Conference on Learning Representations (ICLR). + .. [50] Liu, T., Puigcerver, J., & Blondel, M. (2023). Sparsity-constrained optimal transport. + Proceedings of the Eleventh International Conference on Learning Representations (ICLR). See Also -------- diff --git a/ot/stochastic.py b/ot/stochastic.py index da0639f73..29a8783db 100644 --- a/ot/stochastic.py +++ b/ot/stochastic.py @@ -58,10 +58,13 @@ def coordinate_grad_semi_dual(b, M, reg, beta, i): ------- coordinate gradient : ndarray, shape (nt,) + .. _references-coordinate-grad-semi-dual: References ---------- - .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) Stochastic Optimization for Large-scale Optimal Transport. Advances in Neural Information Processing Systems (2016). + .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) + Stochastic Optimization for Large-scale Optimal Transport. + Advances in Neural Information Processing Systems (2016). """ r = M[i, :] - beta exp_beta = np.exp(-r / reg) * b @@ -119,10 +122,13 @@ def sag_entropic_transport(a, b, M, reg, numItermax=10000, lr=None, random_state v : ndarray, shape (`nt`,) Dual variable. + .. _references-sag-entropic-transport: References ---------- - .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) Stochastic Optimization for Large-scale Optimal Transport. Advances in Neural Information Processing Systems (2016). + .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) + Stochastic Optimization for Large-scale Optimal Transport. + Advances in Neural Information Processing Systems (2016). """ if lr is None: @@ -191,10 +197,13 @@ def averaged_sgd_entropic_transport( ave_v : ndarray, shape (`nt`,) dual variable + .. _references-averaged-sgd-entropic-transport: References ---------- - .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) Stochastic Optimization for Large-scale Optimal Transport. Advances in Neural Information Processing Systems (2016). + .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) + Stochastic Optimization for Large-scale Optimal Transport. + Advances in Neural Information Processing Systems (2016). """ if lr is None: @@ -250,10 +259,13 @@ def c_transform_entropic(b, M, reg, beta): u : ndarray, shape (`ns`,) Dual variable. + .. _references-c-transform-entropic: References ---------- - .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) Stochastic Optimization for Large-scale Optimal Transport. Advances in Neural Information Processing Systems (2016). + .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) + Stochastic Optimization for Large-scale Optimal Transport. + Advances in Neural Information Processing Systems (2016). """ n_source = np.shape(M)[0] @@ -325,10 +337,13 @@ def solve_semi_dual_entropic( log : dict log dictionary return only if log==True in parameters + .. _references-solve-semi-dual-entropic: References ---------- - .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) Stochastic Optimization for Large-scale Optimal Transport. Advances in Neural Information Processing Systems (2016). + .. [18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) + Stochastic Optimization for Large-scale Optimal Transport. + Advances in Neural Information Processing Systems (2016). """ if method.lower() == "sag": @@ -416,10 +431,12 @@ def batch_grad_dual(a, b, M, reg, alpha, beta, batch_size, batch_alpha, batch_be grad : ndarray, shape (`ns`,) partial grad F + .. _references-batch-grad-dual: References ---------- - .. [19] Seguy, V., Bhushan Damodaran, B., Flamary, R., Courty, N., Rolet, A.& Blondel, M. Large-scale Optimal Transport and Mapping Estimation. International Conference on Learning Representation (2018) + .. [19] Seguy, V., Bhushan Damodaran, B., Flamary, R., Courty, N., Rolet, A.& Blondel, M. + Large-scale Optimal Transport and Mapping Estimation. International Conference on Learning Representation (2018) """ G = -( np.exp( diff --git a/ot/unbalanced/_mm.py b/ot/unbalanced/_mm.py index 47fb1ca7c..0d40f909b 100644 --- a/ot/unbalanced/_mm.py +++ b/ot/unbalanced/_mm.py @@ -116,6 +116,7 @@ def mm_unbalanced( .. [41] Chapel, L., Flamary, R., Wu, H., Févotte, C., and Gasso, G. (2021). Unbalanced optimal transport through non-negative penalized linear regression. NeurIPS. + See Also -------- ot.lp.emd : Unregularized OT diff --git a/ot/unbalanced/_sinkhorn.py b/ot/unbalanced/_sinkhorn.py index fbb2f8757..d338e1652 100644 --- a/ot/unbalanced/_sinkhorn.py +++ b/ot/unbalanced/_sinkhorn.py @@ -141,6 +141,7 @@ def sinkhorn_unbalanced( array([[0.3220536, 0.1184769], [0.1184769, 0.3220536]]) + .. _references-sinkhorn-unbalanced: References ---------- @@ -368,6 +369,7 @@ def sinkhorn_unbalanced2( >>> np.round(ot.unbalanced.sinkhorn_unbalanced2(a, b, M, 1., 1.), 8) 0.19600125 + .. _references-sinkhorn-unbalanced2: References ---------- @@ -387,8 +389,8 @@ def sinkhorn_unbalanced2( Processing Systems (NIPS) 2015 .. [73] Séjourné, T., Vialard, F. X., & Peyré, G. (2022). - Faster unbalanced optimal transport: Translation invariant sinkhorn and 1-d frank-wolfe. - In International Conference on Artificial Intelligence and Statistics (pp. 4995-5021). PMLR. + Faster unbalanced optimal transport: Translation invariant sinkhorn and 1-d frank-wolfe. + In International Conference on Artificial Intelligence and Statistics (pp. 4995-5021). PMLR. See Also -------- @@ -679,6 +681,7 @@ def sinkhorn_knopp_unbalanced( array([[0.3220536, 0.1184769], [0.1184769, 0.3220536]]) + .. _references-sinkhorn-knopp-unbalanced: References ---------- @@ -941,6 +944,7 @@ def sinkhorn_stabilized_unbalanced( array([[0.3220536, 0.1184769], [0.1184769, 0.3220536]]) + .. _references-sinkhorn-stabilized-unbalanced: References ---------- @@ -1219,12 +1223,13 @@ def sinkhorn_unbalanced_translation_invariant( array([[0.32205357, 0.11847689], [0.11847689, 0.32205357]]) + .. _references-sinkhorn-unbalanced-translation-invariant: References ---------- .. [73] Séjourné, T., Vialard, F. X., & Peyré, G. (2022). - Faster unbalanced optimal transport: Translation invariant sinkhorn and 1-d frank-wolfe. - In International Conference on Artificial Intelligence and Statistics (pp. 4995-5021). PMLR. + Faster unbalanced optimal transport: Translation invariant sinkhorn and 1-d frank-wolfe. + In International Conference on Artificial Intelligence and Statistics (pp. 4995-5021). PMLR. """ M, a, b = list_to_array(M, a, b) diff --git a/ot/weak.py b/ot/weak.py index aa504f7ac..71739605b 100644 --- a/ot/weak.py +++ b/ot/weak.py @@ -81,8 +81,8 @@ def weak_optimal_transport( References ---------- .. [39] Gozlan, N., Roberto, C., Samson, P. M., & Tetali, P. (2017). - Kantorovich duality for general transport costs and applications. - Journal of Functional Analysis, 273(11), 3327-3405. + Kantorovich duality for general transport costs and applications. + Journal of Functional Analysis, 273(11), 3327-3405. See Also --------