8000 GitHub - khainb/sbnpm-sot: Official implementation for paper: Summarizing Bayesian Nonparametric Mixture Posterior - Sliced Optimal Transport Metrics for Gaussian Mixtures
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Official implementation for paper: Summarizing Bayesian Nonparametric Mixture Posterior - Sliced Optimal Transport Metrics for Gaussian Mixtures

License

Notifications You must be signed in to change notification settings

khainb/sbnpm-sot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbnpm-sot

Official implementation for paper: Summarizing Bayesian Nonparametric Mixture Posterior - Sliced Optimal Transport Metrics for Gaussian Mixtures

The code can also be found at https://github.com/khainb/sbnpm-sot.

Details of the model architecture and experimental results can be found in our papers.

@article{nguyen2024summarizing,
  title={Summarizing Bayesian Nonparametric Mixture Posterior--Sliced Optimal Transport Metrics for Gaussian Mixtures},
  author={Nguyen, Khai and Mueller, Peter},
  journal={arXiv preprint arXiv:2411.14674},
  year={2024}
}

Please CITE our paper whenever this repository is used to help produce published results or incorporated into other software.

This implementation is made by Khai Nguyen.

Requirements

Python 3.11.4 (with pip) and R 4.3.1 with RStudio were used to produce results, however, they are not strictly required for running the code.

Python packages

These packages were used to produce results, however, their mentioned specific version are not strictly required for running the code.

pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt

If the above versions of packages are not available for your system, use:

pip install torch torchvision torchaudio
pip install -r requirements_general.txt

R packages

Install package salso.

What is included?

  • Implementation of Mixed Sliced Wasserstein (Mix-SW) distance, Sliced Mixture Wasserstein (SMix-W) distance, and posterior summarization framework for Dirichlet Process mixture model.
  • Code for simulation
  • Code for analysis on Faithful dataset
  • Code for testing Monte Carlo approximation

Mix-SW and SMix-W

Please check out sot_gms.py.

Simulation

Code is in the folder simulation.

Please update directory path at line 3 in summarizing_partition_with_salso.R and evaluate_partition_with_salso.R.

cd simulation
python evaluate_density.py
python plotting_density.py
python evaluate_mixing_measures.py
Rscript summarizing_partition_with_salso.R
Rscript evaluate_partition_with_salso.R

For running from scratch:

cd simulation
python run_truncated_dpgmm.py
python summarizing_with_sw.py
python summarizing_with_mixsw.py
python summarizing_with_smixw.py
Rscript summarizing_partition_with_salso.R
python density_from_partition.py
python evaluate_density.py
python plotting_density.py
python evaluate_mixing_measures.py
Rscript evaluate_partition_with_salso.R

Faithful dataset

Code is in the folder faithful.

Please update directory path at line 3 in summarizing_partition_with_salso.R and evaluate_partition_with_salso.R.

cd faithful
python evaluate_density.py
python plotting_density.py
python evaluate_mixing_measures.py
Rscript summarizing_partition_with_salso.R
Rscript evaluate_partition_with_salso.R

For running from scratch:

cd faithful
python run_truncated_dpgmm.py
python summarizing_with_sw.py
python summarizing_with_mixsw.py
python summarizing_with_smixw.py
Rscript summarizing_partition_with_salso.R
python density_from_partition.py
python evaluate_density.py
python plotting_density.py
python evaluate_mixing_measures.py
Rscript evaluate_partition_with_salso.R

Monte Carlo approximation

Code is in the folder MonteCarlo

cd MonteCarlo
python main.py

About

Official implementation for paper: Summarizing Bayesian Nonparametric Mixture Posterior - Sliced Optimal Transport Metrics for Gaussian Mixtures

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0