JuliaOptimalTransport / ExactOptimalTransport.jl

Solving unregularized optimal transport problems with Julia

Home Page:https://juliaoptimaltransport.github.io/ExactOptimalTransport.jl/dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Solving unregularized optimal transport problems with Julia

https://juliaoptimaltransport.github.io/ExactOptimalTransport.jl/dev

License:MIT License


Languages

Language:Julia 100.0%