MOT
Implementations of the algorithms in the paper Approximative Algorithms for Multi-Marginal Optimal Transport and Free-Support Wasserstein Barycenters (von Lindheim, 2022). 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
- Download the code or clone the Github repository with
git clone https://github.com/jvlindheim/mot.git
- For the code in
mot.py
, there is the following dependencies:numpy
,matplotlib.pyplot
, thecdist
function fromscipy.spatial.distance
and theemd
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.