GetDist: a Python package for analysing Monte Carlo samples

Antony Lewis
10/30/2019
astro-ph.IMastro-ph.COphysics.data-an

Official code: cmbant/getdist (197 stars, Python, last commit 2026-08-05).

Abstract

Monte Carlo techniques, including MCMC and other methods, are widely used in Bayesian inference to generate sets of samples from a parameter space of interest. The Python GetDist package provides tools for analysing these samples and calculating marginalized one- and two-dimensional densities using Kernel Density Estimation (KDE).

Show full abstract

Many Monte Carlo methods produce correlated and/or weighted samples, for example produced by MCMC, nested, or importance sampling, and there can be hard boundary priors. GetDist's baseline method consists of applying a linear boundary kernel, and then using multiplicative bias correction. The smoothing bandwidth is selected automatically following Botev et al., based on a mixture of heuristics and optimization results using the expected scaling with an effective number of samples (defined here to account for both MCMC correlations and weights). Two-dimensional KDE uses an automatically-determined elliptical Gaussian kernel for correlated distributions. The package includes tools for producing a variety of publication-quality figures using a simple named-parameter interface, as well as a graphical user interface that can be used for interactive exploration. It can also calculate convergence diagnostics, produce tables of limits, and output in LaTeX, and is publicly available.

View on arXivView PDF

Code Implementations(1)

cmbant/getdistOfficial100%

MCMC sample analysis, kernel densities, plotting, and GUI

19763Python, ShellMay 20, 20153 months agoNOASSERTION
contour-plotkernel-density-estimationmcmcplotting-in-pythonsampling-methods+1 more

Similar Papers

Cite this paper

@article{lewis2019getdist,
  title  = {GetDist: a Python package for analysing Monte Carlo samples},
  author = {Antony Lewis},
  year   = {2019},
  eprint = {1910.13970},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1910.13970}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1910.13970.svg)](https://codeofpaper.com/paper/1910.13970)

Discussion