-
Notifications
You must be signed in to change notification settings - Fork 506
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
[MRG] New API ot.solve_sample #563
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #563 +/- ##
==========================================
+ Coverage 96.54% 96.61% +0.07%
==========================================
Files 74 74
Lines 14870 15036 +166
==========================================
+ Hits 14356 14527 +171
+ Misses 514 509 -5 |
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.
Really cool PR @rflamary, one lazy function to rule them all.
I've made a few comments to help you conclude this PR.
|
||
|
||
def solve(M, a=None, b=None, reg=None, reg_type="KL", unbalanced=None, | ||
unbalanced_type='KL', n_threads=1, max_iter=None, plan_init=None, | ||
unbalanced_type='KL', method=None, n_threads=1, max_iter=None, plan_init=None, |
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.
method
missing in the doc.
Types of changes
Implement the first shot as the
ot.solve_sample
API.For standard parameters (the same as ot.solve) it is a simple wrapper that pr-compute the cost matrix using the
metric
parameter and return the same solutions. But this function also provides other approximated OT solvers that can be selected withmethod
and large scale lazy solvers that avoid computation of the full cost matrix withlazy=True
Some examples of use below:
Motivation and context / Related issue
How has this been tested (if it applies)
PR checklist