POT
POT copied to clipboard
[WIP] quantized gromov wasserstein solver
Types of changes
Implementation of first solvers for the quantized Fused Gromov-Wasserstein (qFGW) distance.
- creation of new files
ot/gromov/_quantized.pyandtest/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_OTallows 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_wassersteinandemd_1dsolvers.
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 matricesC1andC2treated as graphs, optionally as feature matricesF1andF2, optionally other structure matricesC1_auxandC2_auxused for partitioning and representant selection implemented inget_graph_partitionandget_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 samplesX1andX2endowed with an euclidean geometry on their respective space, optionally with feature matricesF1andF2, 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)
- tests for all configurations in
test.test_gromov.py::test_quantized_gromov
PR checklist
- [x] I have read the CONTRIBUTING document.
- [x] The documentation is up-to-date with the changes I made (check build artifacts).
- [x] All tests passed, and additional code has been covered with new tests.
- [x] I have added the PR and Issue fix to the RELEASES.md file.
Codecov Report
Attention: Patch coverage is 93.47826% with 36 lines in your changes are missing coverage. Please review.
Project coverage is 96.67%. Comparing base (
2472dd4) to head (096955a).
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