Learn R Programming

WSGeometry (version 1.2.1)

Geometric Tools Based on Balanced/Unbalanced Optimal Transport

Description

Includes a variety of methods to compute objects related to the 'Wasserstein distance' (also known as 'Kantorovich distance' or 'Earth-Mover distance'). The main effort of this package is to allow for computations of 'Wasserstein barycenter' using regularised, unregularised and stochastic methods. It also provides convenient wrappers to call the 'transport' package with more general inputs. Handy visual tools are provided to showcase, barycenters, animations of optimal transport geodesics and animations of principal components in the 'Wasserstein space'. It also includes tools to compute 'Kantorovich-Rubinstein' distances and barycenters.

Copy Link

Version

Install

install.packages('WSGeometry')

Monthly Downloads

75

Version

1.2.1

License

GPL-3

Maintainer

Florian Heinemann

Last Published

December 14th, 2021

Functions in WSGeometry (1.2.1)

grid_positions

Generate a 2d grid in [0,1]^2 of given size.
multi_marginal

Solve the multimarginal optimal transport problem by linear programming
location_scatter_bary

Computes the 2-Wasserstein barycenter of location-scatter families of measures
ws_dist

Compute the p-Wasserstein distance between two measures
kr_dist

Compute the p-Kantorovich-Rubinstein distance between two measures of possibly unequal total mass.
ws_bary_maaipm

Solves the 2-Wasserstein Barycenter problem between N probability measures on R^d using an interior point method.
kr_bary

Solves the (2,C)-Barycenter problem between N measures of possibly unequal total mass on R^d.
smear

Split the values of entries in a matrix between a specified area round it.
plotGeodesic

Plot previously computed Wasserstein geodesics
bin2d

Bin data onto a grid.
geodesic_pos

Compute Wasserstein geodesics
frechet_func

Compute the Frechet functional/The objective value of the barycenter problem
ws_logpca

Computes Wasserstein principal components
wasserstein_bary

Compute Wasserstein barycenters
barycenter_lp

Exact computation of 2-Wasserstein barycenters in R^d using linear programming