Skip to content

JuliaOptimalTransport/ExactOptimalTransport.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExactOptimalTransport.jl

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.

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

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.