Code Monkey home page Code Monkey logo

tmp's Introduction

Stochastic Wasserstein Barycenters

Code accompanying https://arxiv.org/abs/1802.05757

Description

Optimal transport (OT) defines a powerful way to compare and transform distributions using a metric on the space of probability distributions given by the Wasserstein distance. In particular, Wasserstein barycenters can be understood as Frechet means in the space of probability distributions.

We propose a new stochastic algorithm to compute the barycenter of a set of input distributions (either discrete or continuous) that only depends on the ability to sample from the input distributions and does not require a discretization of the support of the barycenter.

Codebase

There are two implementations of the paper in this repository.

MATLAB

A MATLAB version meant as a proof of concept. The MATLAB code is fully commented, easier to understand, and has no dependencies. It is not intended for large applications. We include an example test.m script for typical usage.

C++

A C++ version that we have used to generate the results in the paper. The C++ version depends on Eigen and LBFGS which are locally included, as well as OpenCV for image processing. This version of the code has much sparser documentation.

To compile the C++ version:

cd c++/
mkdir build
cd build/
cmake ..
make

An example usage is ./main --folder figs/ --gaussian 3 which computes the Wasserstein barycenter of three random Gaussian distributions.

tmp's People

Contributors

sbyebss avatar sebastian-claici avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.