Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions ot/bregman/_barycenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
3 changes: 2 additions & 1 deletion ot/bregman/_sinkhorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1460,6 +1460,7 @@ def sinkhorn_epsilon_scaling(
array([[0.36552929, 0.13447071],
[0.13447071, 0.36552929]])


.. _references-sinkhorn-epsilon-scaling:
References
----------
Expand Down
75 changes: 37 additions & 38 deletions ot/da.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down Expand Up @@ -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
--------
Expand Down Expand Up @@ -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,"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

"""

Expand Down Expand Up @@ -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__(
Expand Down Expand Up @@ -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,"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

"""

Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions ot/dr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
17 changes: 9 additions & 8 deletions ot/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ot/gromov/_gw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
----------
Expand Down
2 changes: 2 additions & 0 deletions ot/gromov/_partial.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ def partial_fused_gromov_wasserstein(
log : dict
Convergence information and loss.


.. _references-partial-gromov-wasserstein:
References
----------
Expand Down Expand Up @@ -907,6 +908,7 @@ def partial_fused_gromov_wasserstein2(
log : dict
log dictionary returned only if `log` is `True`


.. _references-partial-gromov-wasserstein2:
References
----------
Expand Down
24 changes: 12 additions & 12 deletions ot/gromov/_semirelaxed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions ot/gromov/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading
Loading