GithubHelp home page GithubHelp logo

tbmiller-astro / sbi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sbi-dev/sbi

0.0 0.0 0.0 45.28 MB

Simulation-based inference toolkit

Home Page: https://www.mackelab.org/sbi/

License: GNU Affero General Public License v3.0

Python 100.00%

sbi's Introduction

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)

Sequential Neural Variational Inference (SNVI)

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 supported by the German Federal Ministry of Education and Research (BMBF) through the project ADIMEM, FKZ 01IS18052 A-D). ADIMEM is a collaborative project between the groups of Jakob Macke (Uni Tübingen), Philipp Berens (Uni Tübingen), Philipp Hennig (Uni Tübingen) and Marcel Oberlaender (caesar Bonn) which aims to develop inference methods for mechanistic models.

License

Affero General Public License v3 (AGPLv3)

Citation

If you use sbi consider citing the sbi software paper, in addition to the original research articles describing the specifc sbi-algorithm(s) you are using:

@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}
}

sbi's People

Contributors

michaeldeistler avatar janfb avatar jan-matthis avatar famura avatar ppjgoncalves avatar gmoss13 avatar tommoral avatar jnsbck avatar manuelgloeckler avatar psteinb avatar louisrouillard avatar tbmiller-astro avatar dgreenberg avatar alvorithm avatar rdgao avatar milagorecki avatar ybernaerts avatar plcrodrigues avatar glouppe avatar conormdurkan avatar agramfort avatar bkmi avatar harry-fuyu avatar jahma avatar lappalainenj avatar julialinhart avatar milescranmer avatar narendramukherjee avatar ntolley avatar pitmonticone 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.