Skip to content

Approximative algorithms for free-support Wasserstein-2 barycenters of discrete probability distributions.

License

Notifications You must be signed in to change notification settings

jvlindheim/free-support-barycenters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Free-Support Wasserstein-2 Barycenters

Implementations of the algorithms from the paper Simple Approximative Algorithms for Free-Support Wasserstein Barycenters (von Lindheim, 2022). For algorithms for the related multi-marginal optimal transport problem, see this repository.

Using the emd OT solver from the Python Optimal Transport (POT) package, which is a wrapper of this network simplex solver, which, in turn, is based on an implementation in the LEMON C++ library.

Installation

  1. Download the code or clone the Github repository with
git clone https://github.com/jvlindheim/free-support-barycenters.git
  1. For the code in bary.py, there is the following dependencies: numpy, matplotlib.pyplot, the cdist function from scipy.spatial.distance and the emd function from the POT library. You can install them e.g. using pip via
pip install --user numpy scipy matplotlib POT

If you want to run the demo notebook, you will also need to have Jupyter Notebook or JupyterLab installed.

About

Approximative algorithms for free-support Wasserstein-2 barycenters of discrete probability distributions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published