Skip to content

A Python toolkit for (simulation-based) inference and the mechanization of science.

License

Notifications You must be signed in to change notification settings

montefiore-institute/hypothesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python toolkit for (likelihood-free) inference and the mechanization of the scientific method.

Installation

From source

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

from hypothesis.benchmark.mg1 import Simulator
from hypothesis.benchmark.mg1 import Prior

simulator = Simulator()
prior = Prior()

inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)

Biomolecular docking

✔️ Supports experimental design

from hypothesis.benchmark.biomoleculardocking import Simulator
from hypothesis.benchmark.biomoleculardocking import Prior

simulator = 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

✔️ Supports experimental design

from hypothesis.benchmark.death import Simulator
from hypothesis.benchmark.death import Prior

simulator = 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

✔️ Supports experimental design

from hypothesis.benchmark.sir import Simulator
from hypothesis.benchmark.sir import Prior

simulator = 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

✔️ Supports experimental design

from hypothesis.benchmark.spatialsir import Simulator
from hypothesis.benchmark.spatialsir import Prior

simulator = 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

from hypothesis.benchmark.tractable import Simulator
from hypothesis.benchmark.tractable import Prior

simulator = Simulator()
prior = Prior()

inputs = prior.sample((10,)) # Draw 10 samples from the prior.
outputs = simulator(inputs)

Weinberg

✔️ Supports experimental design

from hypothesis.benchmark.weinberg import Simulator
from hypothesis.benchmark.weinberg import Prior

simulator = 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.

About

A Python toolkit for (simulation-based) inference and the mechanization of science.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages