bayesflow.benchmarks.two_moons module#
- bayesflow.benchmarks.two_moons.prior(lower_bound=-1.0, upper_bound=1.0, rng=None)[source]#
Generates a random draw from a 2-dimensional uniform prior bounded between lower_bound and upper_bound which represents the two parameters of the two moons simulator.
- Parameters:
- lower_boundfloat, optional, default-1
The lower bound of the uniform prior.
- upper_boundfloat, optional, default1
The upper bound of the uniform prior.
- rngnp.random.Generator or None, default: None
An optional random number generator to use.
- Returns:
- thetanp.ndarray of shape (2,)
A single draw from the 2-dimensional uniform prior.
- bayesflow.benchmarks.two_moons.simulator(theta, rng=None)[source]#
Implements data generation from the two-moons model with a bimodal posterior. See https://arxiv.org/pdf/2101.04653.pdf, Benchmark Task T.8
- Parameters:
- thetanp.ndarray of shape (2,)
The vector of two model parameters.
- rngnp.random.Generator or None, default: None
An optional random number generator to use.
- Returns:
- xnp.ndarray of shape (2,)
The 2D vector generated from the two moons simulator.