You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -391,3 +391,5 @@ Artificial Intelligence.
391
391
[75] Altschuler, J., Chewi, S., Gerber, P. R., & Stromme, A. (2021). [Averaging on the Bures-Wasserstein manifold: dimension-free convergence of gradient descent](https://papers.neurips.cc/paper_files/paper/2021/hash/b9acb4ae6121c941324b2b1d3fac5c30-Abstract.html). Advances in Neural Information Processing Systems, 34, 22132-22145.
392
392
393
393
[76] Martin, R. D., Medri, I., Bai, Y., Liu, X., Yan, K., Rohde, G. K., & Kolouri, S. (2024). [LCOT: Linear Circular Optimal Transport](https://openreview.net/forum?id=49z97Y9lMq). International Conference on Learning Representations.
394
+
395
+
[77] Liu, X., Bai, Y., Martín, R. D., Shi, K., Shahbazi, A., Landman, B. A., Chang, C., & Kolouri, S. (2025). [Linear Spherical Sliced Optimal Transport: A Fast Metric for Comparing Spherical Data](https://openreview.net/forum?id=fgUFZAxywx). International Conference on Learning Representations.
Generates n_projections samples from the uniform distribution on the Stiefel manifold of dimension :math:`d\times 2`: :math:`\mathbb{V}_{d,2}=\{X \in \mathbb{R}^{d\times 2}, X^TX=I_2\}`
Projection of :math:`x\in S^{d-1}` on circles using coordinates on [0,1[.
341
+
342
+
To get the projection on the circle, we use the following formula:
343
+
.. math::
344
+
P^U(x) = \frac{U^Tx}{\|U^Tx\|_2}
345
+
346
+
where :math:`U` is a random matrix sampled from the uniform distribution on the Stiefel manifold of dimension :math:`d\times 2`: :math:`\mathbb{V}_{d,2}=\{X \in \mathbb{R}^{d\times 2}, X^TX=I_2\}`
347
+
and :math:`x` is a point on the sphere. Then, we apply the function get_coordinate_circle to get the coordinates on :math:`[0,1[`.
348
+
349
+
Parameters
350
+
----------
351
+
x : ndarray, shape (n_samples, dim)
352
+
samples on the sphere
353
+
n_projections : int, optional
354
+
Number of projections used for the Monte-Carlo approximation
where :math:`\mu,\nu\in\mathcal{P}(S^{d-1})` are two probability measures on the sphere, :math:`\mathrm{LCOT}_2` is the linear circular optimal transport distance,
577
+
and :math:`P^U_\# \mu` stands for the pushforwards of the projection :math:`\forall x\in S^{d-1},\ P^U(x) = \frac{U^Tx}{\|U^Tx\|_2}`.
578
+
579
+
Parameters
580
+
----------
581
+
X_s: ndarray, shape (n_samples_a, dim)
582
+
Samples in the source domain
583
+
X_t: ndarray, shape (n_samples_b, dim), optional
584
+
Samples in the target domain. If None, computes the distance against the uniform distribution on the sphere.
585
+
a : ndarray, shape (n_samples_a,), optional
586
+
samples weights in the source domain
587
+
b : ndarray, shape (n_samples_b,), optional
588
+
samples weights in the target domain
589
+
n_projections : int, optional
590
+
Number of projections used for the Monte-Carlo approximation
.. [77] Liu, X., Bai, Y., Martín, R. D., Shi, K., Shahbazi, A., Landman, B. A., Chang, C., & Kolouri, S. (2025). Linear Spherical Sliced Optimal Transport: A Fast Metric for Comparing Spherical Data. International Conference on Learning Representations.
618
+
"""
619
+
620
+
ifaisnotNoneandbisnotNone:
621
+
nx=get_backend(X_s, X_t, a, b)
622
+
else:
623
+
nx=get_backend(X_s, X_t)
624
+
625
+
ifX_s.shape[1] !=X_t.shape[1]:
626
+
raiseValueError(
627
+
"X_s and X_t must have the same number of dimensions {} and {} respectively given".format(
0 commit comments