-
Notifications
You must be signed in to change notification settings - Fork 86
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 primal_cost
and dual_cost
for Sinkhorn outputs (only primal for LR) for arbitrary geometries.
#184
Merged
Conversation
This file contains 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
ot_cost
for arbitrary geometry.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #184 +/- ##
==========================================
- Coverage 89.28% 89.26% -0.02%
==========================================
Files 51 51
Lines 5187 5234 +47
Branches 527 529 +2
==========================================
+ Hits 4631 4672 +41
- Misses 430 434 +4
- Partials 126 128 +2
|
michalk8
requested changes
Nov 25, 2022
michalk8
reviewed
Nov 26, 2022
ot_cost
for arbitrary geometry.primal_cost
and dual_cost
for Sinkhorn outputs (only primal for LR) for arbitrary geometries.
Changed my mind, |
michalk8
approved these changes
Nov 28, 2022
michalk8
pushed a commit
that referenced
this pull request
Jun 27, 2024
…imal for LR) for arbitrary geometries. (#184) * instantiate ot_cost for arbitrary geometry. * lint * fix assert in rank for to_LRCGeometry method. * fixes * linter * linter * fix extra bit of memory. * _check_LRC_dim becomes private. * bug * linters and comments. * doc * change naming, introduce dual_cost * linter
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.
ot_cost
property for sinkhorn and sinkhorn_lr outputs #180 by introducing a property to computeprimal_cost
, the bare cost of transportation (i.e. the dot product between a coupling matrix and the corresponding cost matrix) forsinkhorn
andsinkhorn_lr
(it was already there for the latter, just renamed). While trivial for standard geometries, notably genericGeometry
objects, this is a bit more complicated forPointCloud
and required the ability to cast an arbitraryGrid
(itself with possibly low rank costs at each dimension) into a low-rank geometry.Grid
toLRCGeometry
requires casting all cost matrices intoLRC
, introduce the possibility, usingrank=0
orrank>=min(n,m)
to default to SVD to cast an exact, low-rank factorization.dual_cost
(much easier to compute) for outputs ofsinkhorn
andsinkhorn_lr
.primal_cost
inGrid
, exhibit bugGrid
geometry handling of 0 weights seems buggy #185.sinkhorn
to amend for the fact that in the case updates are parallel, both marginals should be computed.