Repository navigation
[MRG] Support a separate output grid in the LP barycenter - #931
Open
bingdongni wants to merge 4 commits into
Open
bingdongni wants to merge 4 commits into
bingdongni wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #931 +/- ##
=======================================
Coverage 97.09% 97.10%
=======================================
Files 130 130
Lines 27229 27251 +22
=======================================
+ Hits 26437 26461 +24
+ Misses 792 790 -2 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A histogram on a fine measurement grid may need a barycenter on a much smaller reporting grid.
ot.lp.barycentercurrently uses the input bin count for both marginals. This accepts a rectangular cost matrix whose columns define the output support. The weights and the selected solver retain their existing meaning.Changes and tests
The LP now has one transport variable per input/output bin pair and one barycenter variable per output bin. Both the SciPy and CVXOPT paths use these dimensions. A gallery example maps 40 input bins to eight reporting bins.
Linux tests cover single-bin, finer and coarser output grids on HiGHS IPM, HiGHS dual simplex, and CVXOPT. A separate check compared the objective against a one-dimensional search over two-bin barycenters, evaluating each candidate with network-simplex EMD. The GitHub run builds this branch from source with its pinned Eigen dependency and runs the gallery example. The user guide, function reference, and release notes are updated.
A full documentation build at
8108ebfran all 88 gallery examples and verified the rendered guide link, example page, and figure.The Linux lint job passed on
9f7ba60with the project's pre-commit configuration.