bayesflow.benchmarks package#

Submodules#

Module contents#

bayesflow.benchmarks.get_benchmark_module(benchmark_name)[source]#

Loads the corresponding benchmark file under bayesflow.benchmarks.<benchmark_name> as a module and returns it.

class bayesflow.benchmarks.Benchmark(name, mode='joint', seed=None, **kwargs)[source]#

Bases: object

Interface class for a benchmark.

__init__(name, mode='joint', seed=None, **kwargs)[source]#

Creates a benchmark generative model by using the blueprint contained in a benchmark file.

Parameters:
namestr

The name of the benchmark file (without suffix, i.e., .py) to use as a blueprint.

modestr, otpional, default: ‘joint’

The mode in which to configure the data, should be in (‘joint’, ‘posterior’, ‘likelihood’)

seedint or None, optional, default: None

The seed to use if reproducibility is required. Will be passed to a numpy RNG.

**kwargsdict

Optional keyword arguments.

If ‘sim_kwargs’ is present, key-value pairs will be interpreted as arguments for the simulator and propagated accordingly.

If ‘prior_kwargs’ is present, key-value pairs will be interpreted as arguments for the prior and propagated accordingly.