Skip to content

Keanu-Sisouk/SW-Sampling-Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

SW-Sampling-Guide

This github repository contains the code used for the experiment on Gaussian Mixture in the paper "A User's Guide to Sampling Strategies for Sliced Optimal Transport".

Dependencies

To compute the Sliced Wasserstein distance, the library Python Optimal Transport is needed: POT library

Other functions come from the scipy library.

Regarding the requirements for the code used in the ICML2024 paper: "Sliced-Wasserstein Estimation with Spherical Harmonic as Control Variates", Rémi Leluc, Aymeric Dieuleveut, François Portier, Johan Segers and Aigerim Zhuman. Paper, please see the following repositories: SHCV repository, Spherical Harmonics.

Running the scripts

In the folder testSW, you can run the following command:

python3 run_python_scripts.py

to run all the methods. Otherwise choose a file with format name test_*.py to run. Accordingly the ouputs are generated in a npy format to be directly used for plotting.

Supplementary notes

The scripts generated_gaussian_toys.py and compute_ground_truths.py should only be ran to generate new data and new ground truths (true SW). Be aware that the second script has a long computation time (~5 days). To avoid unecessary computation time, the s-Riesz configuration points are already pre-computed and stored in npy format.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages