cosmocompare

Bayesian model comparison by importance sampling of existing nested-sampling chains

I am the principal investigator of the UKRI-funded DiRAC high-performance computing project behind cosmocompare, awarded 100,000 CPU hours on the Cambridge CSD3 supercomputer to map the prior-sensitivity of cosmological Bayesian evidence via importance sampling.

cosmocompare performs Bayesian model comparison without rerunning nested sampling. It takes the posterior samples a survey already produced under one model and prior, reweights them onto a narrowed or changed prior and onto extended models, and recomputes the Bayesian evidence with an uncertainty, so that a model-comparison verdict and its sensitivity to the prior can be obtained in seconds on a laptop.

Prior sensitivity of the evidence for evolving dark energy. The log Bayes factor ln B of w0waCDM against ΛCDM is shown as the prior width is narrowed to a fraction f of its original width about the ΛCDM point (w0, wa) = (−1, 0), for DESI DR2 + CMB alone and combined with the DES-SN5YR, DES-Dovekie and Union3 supernova samples. Each point is obtained by reweighting existing nested-sampling chains rather than rerunning them, and the shaded bands show the uncertainty on ln B. Positive values favour w0waCDM and negative values favour ΛCDM. Open markers indicate unreliable reweighting (effective sample size below 1000 or Pareto k̂ ≥ 0.7).

Installation

pip install cosmocompare                  # reweighting, evidence, diagnostics
pip install "cosmocompare[likelihood]"    # adds the Cobaya likelihood stack

Requires Python 3.11 or later.

Resources