Samplers demo

This site aims gives a demonstration of thirteen different MCMC and nested sampling algorithms that are either written in Python, or have Python-wrapper implementations. The demonstration is a simple toy model of estimating the posteriors on the parameters of a straight line in Gaussian noise of known variance.

Samplers

The MCMC samplers used are:

  1. emcee
  2. TensorFlow Probability
  3. PyMC4
  4. Zeus
  5. PyStan
  6. PyJAGS

The nested sampling algorithms implementations uses are:

  1. Nestle
  2. CPNest
  3. dynesty
  4. UltraNest
  5. PyMultiNest
  6. DNest4
  7. PyPolyChord

A page showing a demonstration and comparison of all the samplers on a fixed data set can be found here.

Examples

Standalone examples for each sampler can be found at the links below:

Information on Docker images that can be used to run all the samplers mentioned above can be found here.

Acknowlegdments

The samplers mentioned above are obviously the work of a lot of people and I am very much indebted to them for producing the software. Hopefully, this site will make it slightly easier for some more people to get started using them. References for each of the packages can be found in the appropriate section of the demonstration page.

This site is heavily based on the Pythonic Perambulations blog by Jake VanderPlas, and was created using Pelican. The source code for the site can be found on GitHub here, and any problems/suggestions can be submitted as issues there, or left as comments on the various pages here.

Also deserving thanks are: Chris Pankow for spotting and fixing many typos and adding useful information to the emcee section of the sampler demonstration page; João Faria for spotting a problem with the DNest4 example and suggesting a fix; and, Johannes Buchner for useful information about effective sample sizes.

The author

My name is Matthew Pitkin and I'm an astrophysicist working on gravitational-wave data analysis in the Department of Physics at the Lancaster University.