[MRG] Slicing UOT by clbonet · Pull Request #765 · PythonOT/POT
Types of changes
This PR aims at implementing the solver for 1D UOT with Frank-Wolfe (Faster Unbalanced Optimal Transport: Translation invariant Sinkhorn and 1-D Frank-Wolfe), as well as the Sliced Unbalanced OT and Unbalanced sliced OT distances (Slicing Unbalanced Optimal Transport).
Changes:
- Added the
ot.solver_1d.emd_1d_dualfunction to compute the dual potentials in 1D efficiently (still some bugs) - Added the
ot.solver_1d.emd_1d_dual_backpropfunction, which computes the dual potentials in 1D by using backpropagation over the 1D wasserstein distance (in pytorch and jax). - Added
ot.unbalanced._solver_1d.uot_1dto compute the 1D UOT problems with Frank-Wolfe - Added
ot.unbalanced._sliced.sliced_unbalanced_otto compute SUOT - Added
ot.unbalanced._sliced.unbalanced_sliced_otto compute USOT - Refactorize circle solvers in
ot.lp.solver_circle.py
Motivation and context / Related issue
These functions allow to compute unbalanced OT problems efficiently.
How has this been tested (if it applies)
Test of the new functions have been added (in test/test_1d_solver.py, test/unbalanced/test_1d_solver.py and test/unbalanced/test_sliced.py).
PR checklist
- I have read the CONTRIBUTING document.
- The documentation is up-to-date with the changes I made (check build artifacts).
- All tests passed, and additional code has been covered with new tests.
- I have added the PR and Issue fix to the RELEASES.md file.