Solving unregularized optimal transport problems with Julia

CI DOI Codecov Coveralls Code Style: Blue

This package provides some Julia implementations of algorithms for solving unregularized optimal transport (Kantorovich) problems.


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.


Contributions are more than welcome! Please feel free to submit an issue or pull request in this repository.


This package was originally part of OptimalTransport.jl.