@@ -583,7 +583,7 @@ def binary_search_circle(u_values, v_values, u_weights=None, v_weights=None, p=1
583
583
r"""Computes the Wasserstein distance on the circle using the Binary search algorithm proposed in [44].
584
584
Samples need to be in :math:`S^1\cong [0,1[`. If they are on :math:`\mathbb{R}`,
585
585
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
587
587
using e.g. the atan2 function.
588
588
589
589
.. math::
@@ -593,7 +593,7 @@ def binary_search_circle(u_values, v_values, u_weights=None, v_weights=None, p=1
593
593
594
594
- :math:`F_u` and :math:`F_v` are respectively the cdfs of :math:`u` and :math:`v`
595
595
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
597
597
598
598
.. math::
599
599
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,
842
842
the binary search algorithm proposed in [44] otherwise.
843
843
Samples need to be in :math:`S^1\cong [0,1[`. If they are on :math:`\mathbb{R}`,
844
844
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
846
846
using e.g. the atan2 function.
847
847
848
848
General loss returned:
@@ -855,7 +855,7 @@ def wasserstein_circle(u_values, v_values, u_weights=None, v_weights=None, p=1,
855
855
.. math::
856
856
W_1(u,v) = \int_0^1 |F_u(t)-F_v(t)-LevMed(F_u-F_v)|\ \mathrm{d}t
857
857
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
859
859
860
860
.. math::
861
861
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,
917
917
def semidiscrete_wasserstein2_unif_circle (u_values , u_weights = None ):
918
918
r"""Computes the closed-form for the 2-Wasserstein distance between samples and a uniform distribution on :math:`S^1`
919
919
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
922
922
using e.g. the atan2 function.
923
923
924
924
.. math::
@@ -928,7 +928,7 @@ def semidiscrete_wasserstein2_unif_circle(u_values, u_weights=None):
928
928
929
929
- :math:`\nu=\mathrm{Unif}(S^1)` and :math:`\mu_n = \sum_{i=1}^n \alpha_i \delta_{x_i}`
930
930
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
932
932
933
933
.. math::
934
934
u = \frac{\pi + \mathrm{atan2}(-x_2,-x_1)}{2\pi}
0 commit comments