dynesty is a Pure Python, MIT-licensed Dynamic Nested Sampling package for estimating Bayesian posteriors
and evidences. See Crash Course and Getting Started
for more information. The latest development version can be found here.
The release paper describing the code can be found here.
dynesty is compatible with both Python 2.7 and Python 3.6. It requires
numpy (for arithmetic),
scipy (for special functions),
matplotlib (for plotting), and
six (to enforce Python 2/3 compliance).
While not required,
tqdm also allows for a nice progress bar.
Installing the most recent stable version of the package is as easy as:
pip install dynesty
Alternately, for users who might want newer development versions, it can also be installed directly from a local copy of the repository by running:
python setup.py install
If you find
dynesty useful in your research, a list of papers that you
should cite can be generated directly from the
sampler object by calling:
This will return a list of relevant papers and corresponding links to download citation information such as BibTex files. As an example:
import dynesty sampler = dynesty.DynamicNestedSampler(loglike, prior_transform, ndim, bound='balls', sample='rwalk') print(sampler.citations)
Returns the following list of papers that should be cited:
Code and Methods: ================ Speagle (2019): ui.adsabs.harvard.edu/abs/2019arXiv190402180S Nested Sampling: =============== Skilling (2004): ui.adsabs.harvard.edu/abs/2004AIPC..735..395S Skilling (2006): projecteuclid.org/euclid.ba/1340370944 Dynamic Nested Sampling: ======================= Higson et al. (2019): doi.org/10.1007/s11222-018-9844-0 Bounding Method: =============== Buchner (2016): ui.adsabs.harvard.edu/abs/2014arXiv1407.5459B Buchner (2017): ui.adsabs.harvard.edu/abs/2017arXiv170704476B Sampling Method: =============== Skilling (2006): projecteuclid.org/euclid.ba/1340370944
If you have utilized some of the error analysis features available through the provided utility functions (see Nested Sampling Errors), you should also cite Chopin & Robert (2010), Higson et al. (2018), and Speagle (2019).
See References and Acknowledgements for additional details.
- Small quality-of-life improvements to plotting.
- Added citation tool.
- Ensemble bounds can now adapt to elongated distributions (with Johannes Buchner).
- Random walks now behave differently near boundaries (with Gregory Ashton).
- Pickling sampler states should now work better in Python 3 (with Dustin Lang.
- Doubled output errors in default approximation in line with theoretical expectations.
- Small bugfixes and docfixes (with Patricio Cubillos).
- Added support for periodic boundary conditions.
- Set up basic tests for continuous integration.
- Added a logo!
- Updated and reorganized documentation and demos.
- Added proper support for gradients.
- Changed defaults and added several “quality of life” improvements.
- Updated documentation.
- Modified re-scaling behavior to better deal with inefficient proposals.
- Improved stability of the current ellipsoid decomposition algorithm.
- Added new
'auto'options and changed a number of defaults to make things easier for general users.
- Plotting now defaults to 95% credible intervals instead of 68%.
- Added in a fast approximation option for
- Modified the default stopping heuristic. It now evaluates significantly faster but is a less accurate probe of the “true” KL divergence.
'rwalk'behavior to better deal with edge cases.
- Changed defaults so performance should now be more stable (albiet slower) for the average user.
- Improved the stability of bounding ellipsoids.
- Fixed performance issues with
- Small plotting improvements.
- Fixed a minor bootstrapping bug that affected performance for some users.
- Fixed a serious bug associated with the new singular decomposition algorithm and changed its behavior so it no longer auto-kills user runs when it fails.
dynestyis now on PyPI!
- Added two new slice sampling options (
- Changed internals to allow user to access quantities during dynamic batch allocation. WARNING: Breaks some aspects of backwards compatibility for advanced users utilizing generators.
- Simplified parallelism options.
- Fixed a singular decomposition bug that occasionally appeared during runtime.
- Small plotting/utility improvements.
- Fixed additional Python 2/3 compatibility bugs.
- Added the ability to pass user-specified custom print functions.
- Added importance reweighting.
- Small improvements to plotting utilities.
- Small changes to improve user outputs and basic functionality.
mapbugs that broke compatibility between Python 2 and 3.
- Fixed a bug where the sampler could break during the first update from the
unit cube when using a
- Introduced a function wrapper for
loglikelihoodfunctions to allow users to pass
- Fixed a small bug that could cause bounding ellipsoids to fail.
- Introduced a stability fix to the default
weight_functionwhen computing evidence-based weights.
Initial beta release.