Skip to content

lgraham20/SBI_Explorations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

SBI Explorations

Experimenting with Simulation Based Inference (https://www.mackelab.org/sbi/) on theoretical and (in the future) real data. Currently exploring how SBI compares to Bayesian analysis on Gaussian data.

Organization

Currently I've written code to run the comparison between SBI and Bayesian analysis on random Gaussian data using two different neural inference algorithms, SNPE and SNRE. In my experience SNRE takes slightly longer to train, and significantly longer to generate sample data for pairplots but it is much better at learning. This is probably because it generates a density ratio instead of attempting to guess a direct posterior distribution (https://arxiv.org/pdf/2007.09114.pdf). In my experience, SNRE usually converges to Gaussian by 3 iterations, while SNPE can take 5 or never converge at all.

The func.py and var.py files contain global variables or functions that are used by the SBI v. Gaussian scripts but not involved in the machine learning. Besides modifying the number of workers you want to generate simulations for SBI and the parameters for a custom density estimator, all the parameters you should need to change will be in the var.py files. Refer to the SNPE.py or SNRE.py (or https://www.mackelab.org/sbi/tutorial/04_density_estimators/) for more information on custom density estimators.

About

Experimenting with Simulation Based Inference (https://www.mackelab.org/sbi/) on theoretical and (in the future) real data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages