Skip to content

Conversation

eloitanguy
Copy link
Collaborator

@eloitanguy eloitanguy commented Jan 20, 2025

Types of changes

  • contribute a generalisation of free_support that accepts any cost function (implements this paper)
  • contribute a specific version of this function in ot.gmm for fast computation of GMM barycenters
  • example for new barycenter function
  • example of GMM barycenters
  • add summary of features and example in README.md
  • added a solver for the "true" fixed-point algo which increases support sizes across iterations

For the (theoretical) fixed-point method, use method='true_fixed_point' in ot.lp.free_support_barycenter_generic_costs and for the barycentric heuristic, use method='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)

  • full coverage in test/test_ot.py and test/test_gmm.py

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.

@github-actions github-actions bot added the ot.lp label Jan 20, 2025
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

❌ Patch coverage is 99.29078% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.15%. Comparing base (d121bf8) to head (6a31a6b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #715      +/-   ##
==========================================
+ Coverage   97.10%   97.15%   +0.04%     
==========================================
  Files         101      101              
  Lines       20493    20913     +420     
==========================================
+ Hits        19900    20317     +417     
- Misses        593      596       +3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added the Tests label Jan 21, 2025
@github-actions github-actions bot added the CI label Jan 21, 2025
@eloitanguy eloitanguy changed the title [WIP] OT barycenters for generic transport costs [MRG] OT barycenters for generic transport costs Jan 21, 2025
@eloitanguy eloitanguy changed the title [MRG] OT barycenters for generic transport costs [WIP] OT barycenters for generic transport costs Mar 18, 2025
@eloitanguy
Copy link
Collaborator Author

eloitanguy commented Jun 6, 2025

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 (method='true_fixed_point'), with a comparison of the two methods in the example.

On my end, this contribution is ready for review :D

@eloitanguy eloitanguy changed the title [WIP] OT barycenters for generic transport costs [MRG] OT barycenters for generic transport costs Jun 7, 2025
Copy link
Collaborator

@cedricvincentcuaz cedricvincentcuaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this very nice PR @eloitanguy ! :)
Follows some comments on the generic barycentre solver for now. I'll revise the GMM parts next.

@eloitanguy eloitanguy changed the title [MRG] OT barycenters for generic transport costs [WIP] OT barycenters for generic transport costs Aug 22, 2025
@eloitanguy
Copy link
Collaborator Author

Hi @cedricvincentcuaz , thanks a lot for your thorough code review! I went through your comments and applied the modifications for most of them. I left the conversations open only for your comments which warrant further discussion or verification.

@eloitanguy eloitanguy changed the title [WIP] OT barycenters for generic transport costs [MRG] OT barycenters for generic transport costs Aug 25, 2025
Copy link
Collaborator

@cedricvincentcuaz cedricvincentcuaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished to review the GMM parts, all good for me. We can merge after you finished to resolve the last small things on the barycentre solvers ! Thanks a lot for this very PR :)

@cedricvincentcuaz cedricvincentcuaz merged commit 1f6d2df into PythonOT:master Aug 26, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants