Skip to content

Commit bb26cf7

Browse files
committed
doc wasserstein circle model as [0,1[
1 parent 0963c66 commit bb26cf7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ot/lp/solver_1d.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def binary_search_circle(u_values, v_values, u_weights=None, v_weights=None, p=1
583583
r"""Computes the Wasserstein distance on the circle using the Binary search algorithm proposed in [44].
584584
Samples need to be in :math:`S^1\cong [0,1[`. If they are on :math:`\mathbb{R}`,
585585
takes the value modulo 1.
586-
If the values are on :math:`S^1\subset\mathbb{R}^2`, first find the coordinates
586+
If the values are on :math:`S^1\subset\mathbb{R}^2`, it is required to first find the coordinates
587587
using e.g. the atan2 function.
588588
589589
.. math::
@@ -593,7 +593,7 @@ def binary_search_circle(u_values, v_values, u_weights=None, v_weights=None, p=1
593593
594594
- :math:`F_u` and :math:`F_v` are respectively the cdfs of :math:`u` and :math:`v`
595595
596-
For values :math:`x=(x_1,x_2)\in S^1`, first get their coordinates with
596+
For values :math:`x=(x_1,x_2)\in S^1`, it is required to first get their coordinates with
597597
598598
.. math::
599599
u = \frac{\pi + \mathrm{atan2}(-x_2,-x_1)}{2\pi}
@@ -842,7 +842,7 @@ def wasserstein_circle(u_values, v_values, u_weights=None, v_weights=None, p=1,
842842
the binary search algorithm proposed in [44] otherwise.
843843
Samples need to be in :math:`S^1\cong [0,1[`. If they are on :math:`\mathbb{R}`,
844844
takes the value modulo 1.
845-
If the values are on :math:`S^1\subset\mathbb{R}^2`, first find the coordinates
845+
If the values are on :math:`S^1\subset\mathbb{R}^2`, it requires to first find the coordinates
846846
using e.g. the atan2 function.
847847
848848
General loss returned:
@@ -855,7 +855,7 @@ def wasserstein_circle(u_values, v_values, u_weights=None, v_weights=None, p=1,
855855
.. math::
856856
W_1(u,v) = \int_0^1 |F_u(t)-F_v(t)-LevMed(F_u-F_v)|\ \mathrm{d}t
857857
858-
For values :math:`x=(x_1,x_2)\in S^1`, first get their coordinates with
858+
For values :math:`x=(x_1,x_2)\in S^1`, it is required to first get their coordinates with
859859
860860
.. math::
861861
u = \frac{\pi + \mathrm{atan2}(-x_2,-x_1)}{2\pi}
@@ -917,8 +917,8 @@ def wasserstein_circle(u_values, v_values, u_weights=None, v_weights=None, p=1,
917917
def semidiscrete_wasserstein2_unif_circle(u_values, u_weights=None):
918918
r"""Computes the closed-form for the 2-Wasserstein distance between samples and a uniform distribution on :math:`S^1`
919919
Samples need to be in :math:`S^1\cong [0,1[`. If they are on :math:`\mathbb{R}`,
920-
takes the value % 1.
921-
If the values are on :math:`S^1\subset\mathbb{R}^2`, first find the coordinates
920+
takes the value modulo 1.
921+
If the values are on :math:`S^1\subset\mathbb{R}^2`, it is required to first find the coordinates
922922
using e.g. the atan2 function.
923923
924924
.. math::
@@ -928,7 +928,7 @@ def semidiscrete_wasserstein2_unif_circle(u_values, u_weights=None):
928928
929929
- :math:`\nu=\mathrm{Unif}(S^1)` and :math:`\mu_n = \sum_{i=1}^n \alpha_i \delta_{x_i}`
930930
931-
For values :math:`x=(x_1,x_2)\in S^1`, first get their coordinates with
931+
For values :math:`x=(x_1,x_2)\in S^1`, it is required to first get their coordinates with
932932
933933
.. math::
934934
u = \frac{\pi + \mathrm{atan2}(-x_2,-x_1)}{2\pi}

0 commit comments

Comments
 (0)