Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve website organization #1147

Merged
merged 25 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8a77ffa
DOC improve organisation
tomMoral Apr 22, 2024
14dbf9c
FIX pre-commit hooks
tomMoral Apr 22, 2024
89b45a0
add index for tutorials
tomMoral Apr 22, 2024
8818d70
refactor new landing page.
janfb May 7, 2024
867355a
update docs dependencies
janfb May 7, 2024
b20136f
wip: replace nav-bar dropdown with index.
janfb Jun 3, 2024
5891f82
shorter snippet, add publications to main page.
janfb Jun 11, 2024
4552d15
show faq as ordered list, format install.md.
janfb Jun 11, 2024
b19e4d2
join tutorial instructions from README and tutorials/index.
janfb Jun 11, 2024
d388422
shorten snippet, remove navigation bar dropdown details
janfb Jun 11, 2024
ca32ce1
fix snippet
janfb Jun 11, 2024
8d93d5e
fix: links and md headings.
janfb Jun 20, 2024
c7480c1
FIX small changes in index.md
tomMoral Jul 30, 2024
e5d7209
DOC expose doc on PR
tomMoral Jul 30, 2024
2f63976
FIX linter
tomMoral Jul 30, 2024
d2a7b28
FIX workflow target
tomMoral Jul 30, 2024
d1c555d
FIX check doc workflow
tomMoral Jul 30, 2024
2f30d43
Merge branch 'main' into DOC_improve_doc
janfb Aug 6, 2024
b732f6c
refactor: improve landing page and credits; update methods
janfb Aug 6, 2024
7f22346
docs: change gh action to convert nbs and deploy docs upon release
janfb Aug 7, 2024
1a17846
CLN remove mkdocs-jupyter pluggin
tomMoral Aug 7, 2024
1393d8a
DOC remove mkdocs-jupyter+add doc version control
tomMoral Aug 7, 2024
d4675c6
MTN update .gitignore
tomMoral Aug 7, 2024
9af6295
fix: griffe warnings about .md links; refactoring text.
janfb Aug 8, 2024
988afa4
fix: configure gh user in action for pushing to gh-pages
janfb Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 43 additions & 29 deletions docs/docs/index.md
janfb marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# `sbi`: simulation-based inference
# `sbi`: simulation-based inference toolkit

`sbi` is a toolbox that let you run simulation-based inference methods simply using a high level API:
`sbi` provides access to simulation-based inference methods via a user-friendly
interface:

![using sbi](static/infer_demo.gif)
```python
# simulation
theta = prior.sample((1000,))
x = simulator(theta)

# training
inference = SNPE(prior).append_simulations(theta, x)
inference.train()

# inference
posterior = inference.build_posterior()
posterior_samples = posterior.sample((1000,), x=x_o)
janfb marked this conversation as resolved.
Show resolved Hide resolved
```
janfb marked this conversation as resolved.
Show resolved Hide resolved

## Overview

Expand All @@ -11,9 +24,10 @@
```commandline
pip install sbi
```
for more advances install options, see our [Install Guide](install.md).

Then, checkout our material:
for more advanced install options, see our [Install Guide](install.md).

Then, check out our material:

<div class="grid cards" markdown>

Expand All @@ -29,23 +43,22 @@ Then, checkout our material:
<br/><br/>
*The detailed description of the package classes and functions.*

- :book: [__Citation__]()
- :book: [__Citation__](citation.md)
<br/><br/>
*References for the implemented methods.*
*How to cite the `sbi` package.*

</div>


## Motivation and approach

Many areas of science and engineering make extensive use of complex, stochastic,
numerical simulations to describe the structure and dynamics of the processes being
investigated.

A key challenge in simulation-based science is constraining these simulation models'
parameters, which are intepretable quantities, with observational data. Bayesian
parameters, which are interpretable quantities, with observational data. Bayesian
inference provides a general and powerful framework to invert the simulators, i.e.
describe the parameters which are consistent both with empirical data and prior
describe the parameters that are consistent both with empirical data and prior
knowledge.

In the case of simulators, a key quantity required for statistical inference, the
Expand All @@ -64,29 +77,29 @@ parameter space and the observation space, one of the methods will be more suita

![](./static/goal.png)

**Goal: Algorithmically identify mechanistic models which are consistent with data.**
**Goal: Algorithmically identify mechanistic models that are consistent with data.**

Each of the methods above needs three inputs: A candidate mechanistic model, prior
knowledge or constraints on model parameters, and observational data (or summary statistics
thereof).
Each of the methods above needs three inputs: A candidate mechanistic model,
prior knowledge or constraints on model parameters, and observational data (or
summary statistics thereof).

The methods then proceed by

1. sampling parameters from the prior followed by simulating synthetic data from
these parameters,
2. learning the (probabilistic) association between data (or
data features) and underlying parameters, i.e. to learn statistical inference from
simulated data. The way in which this association is learned differs between the
above methods, but all use deep neural networks.
3. This learned neural network is then applied to empirical data to derive the full
space of parameters consistent with the data and the prior, i.e. the posterior
distribution. High posterior probability is assigned to parameters which are
consistent with both the data and the prior, low probability to inconsistent
parameters. While SNPE directly learns the posterior distribution, SNLE and SNRE need
an extra MCMC sampling step to construct a posterior.
4. If needed, an initial estimate of the posterior can be used to adaptively generate
additional informative simulations.

2. learning the (probabilistic) association between data (or data features) and
underlying parameters, i.e. to learn statistical inference from simulated
data. How this association is learned differs between the above methods, but
all use deep neural networks.
3. This learned neural network is then applied to empirical data to derive the
full space of parameters consistent with the data and the prior, i.e. the
posterior distribution. The posterior assigns high probability to parameters
that are consistent with both the data and the prior, and low probability to
inconsistent parameters. While SNPE directly learns the posterior
distribution, SNLE and SNRE need an extra MCMC sampling step to construct a
posterior.
4. If needed, an initial estimate of the posterior can be used to adaptively
generate additional informative simulations.

See [Cranmer, Brehmer, Louppe (2020)](https://doi.org/10.1073/pnas.1912789117) for a recent
review on simulation-based inference.
Expand All @@ -109,8 +122,9 @@ posterior = inference.build_posterior()

`sbi` lets you choose from a variety of _amortized_ and _sequential_ SBI methods:

Amortized methods return a posterior that can be applied to many different observations without retraining,
whereas sequential methods focus the inference on one particular observation to be more simulation-efficient.
Amortized methods return a posterior that can be applied to many different
observations without retraining, whereas sequential methods focus the inference
on one particular observation to be more simulation-efficient.


For an overview of implemented methods see [the Inference API's reference](
Expand Down