Skip to content
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

introduce sinkdiv simplified API, expand glossary with sinkhorn divergence and LR sinkhorn #596

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

marcocuturi
Copy link
Contributor

This PR introduces a few enhancements:

  • introduces a sinkdiv convenience wrapper to compute the Sinkhorn divergence between two point clouds. Using the sinkhorn_divergence method was a bit clumsy in that case, since it required passing first the PointCloud geometry type, clearly overkill for most usages.

  • introduces the possiblity to store the reg_ot_cost between the second point cloud (in a sinkhorn divergence) and itself and use it as an offset. This is useful when one wants to track the true Sinkhorn divergence between two point clouds but do not want to recompute that term at every iteration, say, of a Gradient descent. that quantity is calledoffset_static_b

  • corrects a bug in the plot class, whereby titles were ignored when the show_lines flag was False

  • expands glossary.rst

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@marcocuturi marcocuturi added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 13, 2024
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.17%. Comparing base (828acca) to head (b7f8624).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ott/tools/plot.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #596      +/-   ##
==========================================
+ Coverage   88.13%   88.17%   +0.04%     
==========================================
  Files          73       73              
  Lines        7768     7770       +2     
  Branches      556      556              
==========================================
+ Hits         6846     6851       +5     
+ Misses        779      778       -1     
+ Partials      143      141       -2     
Files with missing lines Coverage Δ
src/ott/solvers/linear/sinkhorn_lr.py 98.98% <ø> (ø)
src/ott/tools/sinkhorn_divergence.py 94.31% <100.00%> (+2.45%) ⬆️
src/ott/tools/plot.py 54.09% <75.00%> (ø)

... and 1 file with indirect coverage changes

@marcocuturi marcocuturi merged commit 86e8f2c into main Nov 13, 2024
12 of 13 checks passed
@marcocuturi marcocuturi deleted the sink_div branch November 21, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant