All Projects → mackelab → Sbi

mackelab / Sbi

Licence: agpl-3.0
Simulation-based inference in PyTorch

Projects that are alternatives of or similar to Sbi

Hmm for autonomous driving
🎓 Educational application of Hidden Markov Model to Autonomous Driving 🚕🚙🚗
Stars: ✭ 39 (-76.22%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bayesian Cognitive Modeling In Pymc3
PyMC3 codes of Lee and Wagenmakers' Bayesian Cognitive Modeling - A Pratical Course
Stars: ✭ 93 (-43.29%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bnlearn
Python package for learning the graphical structure of Bayesian networks, parameter learning, inference and sampling methods.
Stars: ✭ 51 (-68.9%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bayesian Neural Networks
Pytorch implementations of Bayes By Backprop, MC Dropout, SGLD, the Local Reparametrization Trick, KF-Laplace, SG-HMC and more
Stars: ✭ 900 (+448.78%)
Mutual labels:  jupyter-notebook, bayesian-inference
Rethinking Pyro
Statistical Rethinking with PyTorch and Pyro
Stars: ✭ 116 (-29.27%)
Mutual labels:  jupyter-notebook, bayesian-inference
Pycurious
Python package for computing the Curie depth from the magnetic anomaly
Stars: ✭ 22 (-86.59%)
Mutual labels:  jupyter-notebook, bayesian-inference
Pymc Example Project
Example PyMC3 project for performing Bayesian data analysis using a probabilistic programming approach to machine learning.
Stars: ✭ 90 (-45.12%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bayesian Analysis Recipes
A collection of Bayesian data analysis recipes using PyMC3
Stars: ✭ 479 (+192.07%)
Mutual labels:  jupyter-notebook, bayesian-inference
A Nice Mc
Code for "A-NICE-MC: Adversarial Training for MCMC"
Stars: ✭ 115 (-29.88%)
Mutual labels:  jupyter-notebook, bayesian-inference
Pymc3 vs pystan
Personal project to compare hierarchical linear regression in PyMC3 and PyStan, as presented at http://pydata.org/london2016/schedule/presentation/30/ video: https://www.youtube.com/watch?v=Jb9eklfbDyg
Stars: ✭ 110 (-32.93%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bda py demos
Bayesian Data Analysis demos for Python
Stars: ✭ 781 (+376.22%)
Mutual labels:  jupyter-notebook, bayesian-inference
Celeste.jl
Scalable inference for a generative model of astronomical images
Stars: ✭ 142 (-13.41%)
Mutual labels:  jupyter-notebook, bayesian-inference
Dbda Python
Doing Bayesian Data Analysis, 2nd Edition (Kruschke, 2015): Python/PyMC3 code
Stars: ✭ 502 (+206.1%)
Mutual labels:  jupyter-notebook, bayesian-inference
Resources
PyMC3 educational resources
Stars: ✭ 930 (+467.07%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bayesian Stats Modelling Tutorial
How to do Bayesian statistical modelling using numpy and PyMC3
Stars: ✭ 480 (+192.68%)
Mutual labels:  jupyter-notebook, bayesian-inference
Alice
NIPS 2017: ALICE: Towards Understanding Adversarial Learning for Joint Distribution Matching
Stars: ✭ 80 (-51.22%)
Mutual labels:  jupyter-notebook, bayesian-inference
Vae cf
Variational autoencoders for collaborative filtering
Stars: ✭ 386 (+135.37%)
Mutual labels:  jupyter-notebook, bayesian-inference
Neural Tangents
Fast and Easy Infinite Neural Networks in Python
Stars: ✭ 1,357 (+727.44%)
Mutual labels:  jupyter-notebook, bayesian-inference
Glmm In Python
Generalized linear mixed-effect model in Python
Stars: ✭ 131 (-20.12%)
Mutual labels:  jupyter-notebook, bayesian-inference
Rethinking Tensorflow Probability
Statistical Rethinking (2nd Ed) with Tensorflow Probability
Stars: ✭ 152 (-7.32%)
Mutual labels:  jupyter-notebook, bayesian-inference

PyPI version Contributions welcome Tests codecov GitHub license DOI

sbi: simulation-based inference

Getting Started | Documentation

sbi is a PyTorch package for simulation-based inference. Simulation-based inference is
the process of finding parameters of a simulator from observations.

sbi takes a Bayesian approach and returns a full posterior distribution over the parameters, conditional on the observations. This posterior can be amortized (i.e. useful for any observation) or focused (i.e. tailored to a particular observation), with different computational trade-offs.

sbi offers a simple interface for one-line posterior inference.

from sbi.inference import infer
# import your simulator, define your prior over the parameters
parameter_posterior = infer(simulator, prior, method='SNPE', num_simulations=100)

See below for the available methods of inference, SNPE, SNRE and SNLE.

Installation

sbi requires Python 3.6 or higher. We recommend to use a conda virtual environment (Miniconda installation instructions). If conda is installed on the system, an environment for installing sbi can be created as follows:

# Create an environment for sbi (indicate Python 3.6 or higher); activate it
$ conda create -n sbi_env python=3.7 && conda activate sbi_env

Independent of whether you are using conda or not, sbi can be installed using pip:

$ pip install sbi

To test the installation, drop into a python prompt and run

from sbi.examples.minimal import simple
posterior = simple()
print(posterior)

Inference Algorithms

The following algorithms are currently available:

Sequential Neural Posterior Estimation (SNPE)

Sequential Neural Likelihood Estimation (SNLE)

Sequential Neural Ratio Estimation (SNRE)

Feedback and Contributions

We would like to hear how sbi is working for your inference problems as well as receive bug reports, pull requests and other feedback (see contribute).

Acknowledgements

sbi is the successor (using PyTorch) of the delfi package. It was started as a fork of Conor M. Durkan's lfi. sbi runs as a community project; development is coordinated at the mackelab. See also credits.

Support

sbi has been developed in the context of the ADIMEM grant, project A. ADIMEM is a BMBF grant awarded to groups at the Technical University of Munich, University of Tübingen and Research Center caesar of the Max Planck Gesellschaft.

License

Affero General Public License v3 (AGPLv3)

Citation

If you use sbi consider citing the corresponding paper:

@article{tejero-cantero2020sbi,
  doi = {10.21105/joss.02505},
  url = {https://doi.org/10.21105/joss.02505},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {52},
  pages = {2505},
  author = {Alvaro Tejero-Cantero and Jan Boelts and Michael Deistler and Jan-Matthis Lueckmann and Conor Durkan and Pedro J. Gonçalves and David S. Greenberg and Jakob H. Macke},
  title = {sbi: A toolkit for simulation-based inference},
  journal = {Journal of Open Source Software}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].