-
Notifications
You must be signed in to change notification settings - Fork 9
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
Reorganise sinkhorn_stabilized
and sinkhorn_stabilized_epsscaling
#84
Conversation
Pull Request Test Coverage Report for Build 888723622
💛 - Coveralls |
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.
Thanks, these are some good improvements! I planned to update these functions as well and add some tests 👍 There are still some additional improvements that I have in mind but I think they can be postponed to other PRs. I only made some minor suggestions and I think we should fix the sequence of the epsilons right away (it's incorrect currently).
Can you also update the tests to the new format?
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
d71a2f1
to
a72be90
Compare
test/entropic.jl
Outdated
# compute optimal transport map (Julia implementation + POT) | ||
eps = 0.001 | ||
γ = sinkhorn_stabilized(μ, ν, C, eps; maxiter=5_000) | ||
γ_pot = POT.sinkhorn(μ, ν, C, eps; method="sinkhorn_stabilized", numItermax=5_000) |
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.
[JuliaFormatter] reported by reviewdog 🐶
γ_pot = POT.sinkhorn(μ, ν, C, eps; method="sinkhorn_stabilized", numItermax=5_000) | |
γ_pot = POT.sinkhorn( | |
μ, ν, C, eps; method="sinkhorn_stabilized", numItermax=5_000 | |
) |
test/entropic.jl
Outdated
# compute optimal transport map (Julia implementation + POT) | ||
eps = 0.001 | ||
γ = sinkhorn_stabilized_epsscaling(μ, ν, C, eps; k=5, maxiter=5_000) | ||
γ_pot = POT.sinkhorn(μ, ν, C, eps; method="sinkhorn_stabilized", numItermax=5_000) |
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.
[JuliaFormatter] reported by reviewdog 🐶
γ_pot = POT.sinkhorn(μ, ν, C, eps; method="sinkhorn_stabilized", numItermax=5_000) | |
γ_pot = POT.sinkhorn( | |
μ, ν, C, eps; method="sinkhorn_stabilized", numItermax=5_000 | |
) |
Codecov Report
@@ Coverage Diff @@
## master #84 +/- ##
==========================================
+ Coverage 88.36% 96.12% +7.76%
==========================================
Files 1 1
Lines 275 284 +9
==========================================
+ Hits 243 273 +30
+ Misses 32 11 -21
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build 887585953Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 887559779Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
This PR updates
sinkhorn_stabilized
andsinkhorn_stabilized_epsscaling
to use the same calling convention as the othersinkhorn
functions, the convergence criterion, as well as a general refactor.I think it should be doable to allow batch computations similar to #67 , but those can be added in a separate PR once both this and #67 have been merged.