perfectns

https://travis-ci.org/ejhigson/perfectns.svg?branch=master https://coveralls.io/repos/github/ejhigson/perfectns/badge.svg?branch=master https://readthedocs.org/projects/perfectns/badge/?version=latest http://joss.theoj.org/papers/10.21105/joss.00985/status.svg https://api.codeclimate.com/v1/badges/b04cc235c8f73870029c/maintainability https://img.shields.io/badge/license-MIT-blue.svg

Nested sampling (Skilling, 2006) is a popular numerical method for Bayesian computation, which simultaneously generates samples from the posterior distribution and an estimate of the Bayesian evidence for a given likelihood and prior. Dynamic nested sampling (Higson et al., 2017) is a generalisation of the nested sampling algorithm which can provide order-of-magnitude increases in computational efficiency.

perfectns performs dynamic nested sampling and standard nested sampling for spherically symmetric likelihoods and priors, and analyses the samples produced. The spherical symmetry allows the nested sampling algorithm to be followed “perfectly” - i.e. without additional errors due to correlations between samples, which are present in other nested sampling software.

The specialised methods used by perfectns make it highly effective and reliable for spherically symmetric calculations. The software is also intended for use in research into the statistical properties of nested sampling, and to provide a benchmark for testing the performance of nested sampling software packages used for practical problems - which rely on numerical techniques to produce approximately uncorrelated samples. For details of the theory behind the software and of how it performs perfect nested sampling, see the see the theory section of the documentation.

To get started, see the installation instructions and the demo. For more examples of perfectns’s use, see the code used to make the results and figures in the dynamic nested sampling paper (https://github.com/ejhigson/dns).

Attribution

If perfectns is useful for your academic research, please cite the two papers introducing the software and the dynamic nested sampling algorithm. The BibTeX is:

@article{Higson2018perfectns,
author = {Higson, Edward},
title = {perfectns: perfect dynamic and standard nested sampling for spherically symmetric likelihoods and priors},
doi = {10.21105/joss.00985},
journal = {Journal of Open Source Software},
number = {30},
pages = {985},
volume = {3},
year = {2018}}

@article{Higson2017,
author={Higson, Edward and Handley, Will and Hobson, Mike and Lasenby, Anthony},
title={Dynamic nested sampling: an improved algorithm for parameter estimation and evidence calculation},
journal={arXiv preprint arXiv:1704.03459},
url={https://arxiv.org/abs/1704.03459},
year={2017}}

Changelog

The changelog for each release can be found at https://github.com/ejhigson/perfectns/releases.

Contributions

Contributions are welcome! Development takes place on github:

When creating a pull request, please try to make sure the tests pass and use numpy-style docstrings.

If you have any questions or suggestions please get in touch (e.higson@mrao.cam.ac.uk).

Authors & License

Copyright 2018 Edward Higson and contributors (MIT Licence).