-
Notifications
You must be signed in to change notification settings - Fork 528
[MRG] Wasserstein distance on the circle and Spherical Sliced-Wasserstein #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #434 +/- ##
==========================================
+ Coverage 94.43% 94.69% +0.25%
==========================================
Files 24 24
Lines 6254 6593 +339
==========================================
+ Hits 5906 6243 +337
- Misses 348 350 +2 |
rflamary
reviewed
Feb 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @clbonet
This is an impressive PR! I have found a few comments that need to be taken into account (or at leest discussed). Could you look into that please?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types of changes
New functions in solver_1d.py:
New function in sliced.py:
Modifications of backend.py:
New function in utils.py:
New examples:
New tests in test_1d_solver.py:
New tests in test_sliced.py:
New tests in test_backend.py:
New test in test_utils.py:
Motivation and context / Related issue
The Wasserstein distance on the circle can be computed more efficiently using its "closed-forms". For p=1, a closed-form was proposed in The statistics of circular optimal transport, and for p>=1, a binary search algorithm was proposed in Fast transport optimization for Monge costs on the circle.
For data lying on the sphere, we can use a particular sliced-Wasserstein discrepancy by using geodesic projections on the circle.
How has this been tested (if it applies)
PR checklist