Skip to content

bilby-laplace

A Bilby sampler plugin that estimates posteriors via the Laplace approximation — a Gaussian fitted at the maximum a posteriori (MAP) point — followed by optional resampling to correct for non-Gaussianity.

The method is fast, scales well to moderate dimensions, and produces asymptotically exact posterior samples when the true posterior is close to Gaussian. It is useful as a cheap cross-check against nested sampling results.

Originally derived from bilby PR #933.

Where to go next

At a glance

import bilby

result = bilby.run_sampler(
    likelihood=likelihood,
    priors=priors,
    sampler="laplace",
    outdir="outdir",
    label="my_run",
)

The sampler registers through Bilby's plugin entry-point system, so no extra configuration is needed once it is installed.