-
Notifications
You must be signed in to change notification settings - Fork 521
[MRG] OT barycenters for generic transport costs #715
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #715 +/- ##
==========================================
+ Coverage 97.09% 97.13% +0.04%
==========================================
Files 100 100
Lines 20432 20828 +396
==========================================
+ Hits 19839 20232 +393
- Misses 593 596 +3 🚀 New features to boost your workflow:
|
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 @eloitanguy this is very nice work as usual. I have a couple comments below
ot/lp/_barycenter_solvers.py
Outdated
List of K arrays of measure weights, each of shape (m_k). | ||
X_init : array-like | ||
Array of shape (n, d) representing initial barycenter points. | ||
cost_list : list of callable |
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.
could you accept a callable (if same cost for eveyone) and a list?
After discussion with @rflamary we decided to expand the PR with additional features, namely two barycenter solvers:
|
After some updates to the paper behind these algorithms (the paper update is soon to come), I implemented another barycenter solver which corresponds exactly to the method studied theoretically in the paper (iterates of G). I updated this PR with the additional algorithm ( On my end, this contribution is ready for review :D |
Types of changes
free_support
that accepts any cost function (implements this paper)ot.gmm
for fast computation of GMM barycentersREADME.md
For the (theoretical) fixed-point method, use
method='true_fixed_point'
inot.lp.free_support_barycenter_generic_costs
and for the barycentric heuristic, usemethod='L2_barycentric_proj'
. The latter is the default, given the computational advantages and the desirable property of keeping a fixed support size.Motivation and context / Related issue
How has this been tested (if it applies)
test/test_ot.py
andtest/test_gmm.py
PR checklist