Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/montefiore-institute/hypothesis
A Python toolkit for (simulation-based) inference and the mechanization of science.
https://github.com/montefiore-institute/hypothesis
deep-learning inference likelihood-free simulation-based-inference
Last synced: about 2 months ago
JSON representation
A Python toolkit for (simulation-based) inference and the mechanization of science.
- Host: GitHub
- URL: https://github.com/montefiore-institute/hypothesis
- Owner: montefiore-institute
- License: bsd-3-clause
- Created: 2018-10-08T09:17:58.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-15T11:38:05.000Z (over 2 years ago)
- Last Synced: 2024-09-13T19:52:15.172Z (2 months ago)
- Topics: deep-learning, inference, likelihood-free, simulation-based-inference
- Language: Python
- Homepage:
- Size: 5.43 MB
- Stars: 51
- Watchers: 7
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
A Python toolkit for (likelihood-free) inference and the mechanization of the scientific method.
## Installation
### From source
```sh
git clone https://github.com/montefiore-ai/hypothesis
cd hypothesis
pip install -e .
```## Inference
### AALR-MCMC
TODO
### Adversarial Variational Optimization
TODO
### Amortized ratio estimation
TODO
### Approximate Bayesian Computation
TODO
### Approximate Bayesian Computation - Sequential Monte Carlo
TODO
### Likelihood-free Inference by Ratio Estimation
TODO
### Metropolis-Hastings
TODO
## Benchmark problems
### M/G/1
```python
from hypothesis.benchmark.mg1 import Simulator
from hypothesis.benchmark.mg1 import Priorsimulator = Simulator()
prior = Prior()inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)
```### Biomolecular docking
> :heavy_check_mark: Supports experimental design
```python
from hypothesis.benchmark.biomoleculardocking import Simulator
from hypothesis.benchmark.biomoleculardocking import Priorsimulator = Simulator()
prior = Prior()inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)from hypothesis.benchmark.biomoleculardocking import PriorExperiment # Experimental design space
prior_experiment = PriorExperiment()
experimental_designs = prior_experiment.sample((10,))outputs = simulator(inputs, experimental_designs)
```### Stochastic Death model
> :heavy_check_mark: Supports experimental design
```python
from hypothesis.benchmark.death import Simulator
from hypothesis.benchmark.death import Priorsimulator = Simulator()
prior = Prior()inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)from hypothesis.benchmark.death import PriorExperiment # Experimental design space
prior_experiment = PriorExperiment()
experimental_designs = prior_experiment.sample((10,))outputs = simulator(inputs, experimental_designs)
```### Stochastic SIR (Susceptible-Infected-Recovered) model
> :heavy_check_mark: Supports experimental design
```python
from hypothesis.benchmark.sir import Simulator
from hypothesis.benchmark.sir import Priorsimulator = Simulator()
prior = Prior()inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)from hypothesis.benchmark.sir import PriorExperiment # Experimental design space
prior_experiment = PriorExperiment()
experimental_designs = prior_experiment.sample((10,))outputs = simulator(inputs, experimental_designs)
```### Stochastic Spatial SIR (Susceptible-Infected-Recovered) model
> :heavy_check_mark: Supports experimental design
```python
from hypothesis.benchmark.spatialsir import Simulator
from hypothesis.benchmark.spatialsir import Priorsimulator = Simulator()
prior = Prior()inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)from hypothesis.benchmark.spatialsir import PriorExperiment # Experimental design space
prior_experiment = PriorExperiment()
experimental_designs = prior_experiment.sample((10,))outputs = simulator(inputs, experimental_designs)
```### Tractable
```python
from hypothesis.benchmark.tractable import Simulator
from hypothesis.benchmark.tractable import Priorsimulator = Simulator()
prior = Prior()inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)
```### Weinberg
> :heavy_check_mark: Supports experimental design
```python
from hypothesis.benchmark.weinberg import Simulator
from hypothesis.benchmark.weinberg import Priorsimulator = Simulator()
prior = Prior()inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)from hypothesis.benchmark.weinberg import PriorExperiment # Experimental design space
prior_experiment = PriorExperiment()
experimental_designs = prior_experiment.sample((10,))outputs = simulator(inputs, experimental_designs)
```## License
Hypothesis is BSD-style licensed, as found in the LICENSE file.