This repository contains the code used for making the results and plots in the dynamic nested sampling paper (Higson et. al, 2019).
If you have any questions then feel free to email [email protected]. However, note that this is research code and is not actively maintained.
The results in the paper (except those in Section 6.2) were run in Python 3.6 using:
- perfectns v2.0.1;
- dyPolyChord v0.0.0;
- PolyChord v1.14;
- nestcheck v0.1.0.
Later versions of the above software should give the same results. The signal reconstruction example in Section 6.2 were added in a later draft and used:
- dyPolyChord v0.0.5;
- PolyChord v1.15;
- nestcheck v0.1.9;
- bsr v0.0.0.
Aside from dependencies of the above modules (such as scipy
, numpy
, pandas
and matplotlib
), the only other package required is getdist
; this is used for the triangle plots of Gaussian mixture posteriors.
The code is divided into two Jupyter notebooks:
perfectns_paper_results.ipynb
contains perfect nested sampling results and plots. Some results tables are cached in theperfectns_results
directory so this should not take long to run. Alternatively you can reproduce the nested sampling run data yourself usingmake_perfectns_results.py
, although this is quite computationally intensive.numpy
random seeding is used by default, so all results should be reproducible.dypolychord_paper_results.ipynb
contains the code used for the Gaussian mixture model and signal reconstruction results. It requires nested sampling runs which can be generated usingmake_gaussian_mix_results.py
andmake_fit_results.py
; see the module docstrings for more details, including about the random seeding used. This can be done with either the Python or C++ versions of the likelihood (the results are identical up to numerical precision errors, but latter runs much faster).
If it is useful for your research, then please cite the dynamic nested sampling paper. The BibTeX is:
@article{Higson2019dynamic,
author={Higson, Edward and Handley, Will and Hobson, Michael and Lasenby, Anthony},
title={Dynamic nested sampling: an improved algorithm for parameter estimation and evidence calculation},
year={2019},
journal={Statistics and Computing},
volume={29},
number={5},
pages={891--913},
doi={10.1007/s11222-018-9844-0},
url={https://doi.org/10.1007/s11222-018-9844-0},
archivePrefix={arXiv},
arxivId={1704.03459}}