-
Notifications
You must be signed in to change notification settings - Fork 506
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
[WIP] quantized gromov wasserstein solver #603
Merged
cedricvincentcuaz
merged 26 commits into
PythonOT:master
from
cedricvincentcuaz:quantized
May 29, 2024
Merged
[WIP] quantized gromov wasserstein solver #603
cedricvincentcuaz
merged 26 commits into
PythonOT:master
from
cedricvincentcuaz:quantized
May 29, 2024
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
cedricvincentcuaz
changed the title
first commit : quantized gromov wasserstein solver
[WIP] quantized gromov wasserstein solver
Feb 11, 2024
…fficient for numpy and torch
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #603 +/- ##
==========================================
- Coverage 96.78% 96.67% -0.11%
==========================================
Files 83 85 +2
Lines 16284 16836 +552
==========================================
+ Hits 15760 16276 +516
- Misses 524 560 +36 |
rflamary
reviewed
Mar 29, 2024
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.
This is nice, I have a few comments below, contact me on slack if you want to discuss them
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.
Types of changes
Implementation of first solvers for the quantized Fused Gromov-Wasserstein (qFGW) distance.
ot/gromov/_quantized.py
andtest/gromov/test_quantized.py
.quantized_fused_gromov_wasserstein_partitioned
: main function to compute the OT between two partitioned joint spaces with minimal inputs to compute global and local alignments, so that the user can perform any partitioning and representant selection as pre-processing. A boolean optionbuild_OT
allows the user to construct the OT matrix between non-partitioned spaces which might require a lot of memory. Other inputs mainly relate to innerfused_gromov_wasserstein
,gromov_wasserstein
andemd_1d
solvers.remark 1 : i) only the (F)GW conditional gradient solver is considered here. Note that authors also made use of the entropic projected gradient solver. ii) only the square loss is considered for both types of OT problems.
quantized_fused_gromov_wasserstein
: main function to compute the OT between two joint spaces with axioms used by authors to partition both spaces. Taking as inputs structure matricesC1
andC2
treated as graphs, optionally as feature matricesF1
andF2
, optionally other structure matricesC1_aux
andC2_aux
used for partitioning and representant selection implemented inget_graph_partition
andget_graph_representants
.quantized_fused_gromov_wasserstein_samples
: main function to compute the OT between two distributions in different spaces potentially endowed with features, with axioms used by authors to partition both spaces. Taking as inputs samplesX1
andX2
endowed with an euclidean geometry on their respective space, optionally with feature matricesF1
andF2
, where both can be considered for partitioning and representant selection (e.g kmeans) implemented inget_partition_and_representants_samples
.Motivation and context / Related issue
How has this been tested (if it applies)
test.test_gromov.py::test_quantized_gromov
PR checklist