Skip to content

Two moons

sbisandbox.benchmarks.twomoons.TwoMoonsBenchmark

Bases: UniformPriorMixin, Benchmark

Two moons benchmark task.

The parameters \(\boldsymbol{\theta} \in \mathbb{R}^2\) are sampled from

\[ \theta_1 \sim \mathcal{U}([-1, 1])\]
\[ \theta_2 \sim \mathcal{U}([-1, 1])\]

The data \(\boldsymbol{x} \in \mathbb{R}^2\) are generated as follows:

  • Sample the latent variables
\[\alpha \sim \mathcal{U}([-\pi/2, \pi/2])\]
\[r \sim \mathcal{N}(\mu=0.1, \sigma=0.01)\]
  • Define
\[p = (r \cos \alpha + 0.25, r \sin \alpha)\]
  • Output
\[\boldsymbol{x} = p - \left(\frac{|\theta_1 + \theta_2|}{\sqrt{2}}, \frac{\theta_1 - \theta_2}{\sqrt{2}} \right)\]

The name of the model comes from the shape of the posterior distribution \(p(\boldsymbol{\theta} | \boldsymbol{x})\): bimodal with a banana-shaped mass around the modes (a-la a crescent moon).