# SlicedWasserstein.jl
SlicedWasserstein.jl is a lightweight Julia package for computations with finite discrete measures using sliced optimal transport.
The package currently provides:
- a
DiscreteMeasuretype for finite weighted measures; - one-dimensional optimal transport for discrete measures;
- Monte Carlo estimates of sliced Wasserstein costs;
- free-support sliced Wasserstein barycenters;
- sliced Wasserstein k-means clustering.
Installation
using Pkg
Pkg.add("SlicedWasserstein")Quick start
using SlicedWasserstein
μ = DiscreteMeasure(randn(2, 50))
ν = DiscreteMeasure(randn(2, 50) .+ 1)
SOT(μ, ν; M = 100, seed = 1)1.230026516195585Further reading
See Background and methodology for a short introduction to the optimal transport and sliced Wasserstein ideas used by the package.
See API Reference for the documented public interface.
Contents
- Installation
- Quick start
- Further reading
- Contents
- Optimal transport
- Sliced optimal transport
- Discrete measures
- One-dimensional optimal transport
- Sliced Wasserstein barycenters
- Sliced Wasserstein k-means
- Computational notes
- References
- Measures
- Projections
- One-dimensional optimal transport
- Sliced optimal transport
- Barycenters
- Clustering
- Display helpers