ExactOptimalTransport.jl
Solving unregularized optimal transport problems with Julia
This package provides some Julia implementations of algorithms for solving unregularized optimal transport (Kantorovich) problems.
Example
using ExactOptimalTransport
using Distances
using Tulip
# uniform histograms
μ = fill(1/250, 250)
ν = fill(1/200, 200)
# random cost matrix
C = pairwise(SqEuclidean(), rand(1, 250), rand(1, 200); dims=2)
# compute optimal transport map with Tulip
lp = Tulip.Optimizer()
P = emd(μ, ν, C, lp)
# compute optimal transport cost without recomputing the plan
emd2(μ, ν, C, lp; plan=P)
Please see the documentation pages for further information.
Related packages
- OptimalTransport.jl: Julia implementation of algorithms for regularized optimal transport problems with GPU support.
- StochasticOptimalTransport.jl: Julia implementation of stochastic optimization algorithms for large-scale optimal transport.
- PythonOT.jl: Julia interface for the Python Optimal Transport (POT) package.
Contributing
Contributions are more than welcome! Please feel free to submit an issue or pull request in this repository.
Note
This package was originally part of OptimalTransport.jl.