zeus is a pure-Python implementation of the Ensemble Slice Sampling method.
- Fast & Robust Bayesian Inference,
- Efficient Markov Chain Monte Carlo,
- No hand-tuning,
- Excellent performance in terms of autocorrelation time and convergence rate,
- Scale to multiple CPUs without any extra effort,
- Included Convergence Diagnostics.
For instance, if you wanted to draw samples from a 10-dimensional Gaussian, you would do something like:
import numpy as np
import zeus
def log_prob(x, ivar):
return - 0.5 * np.sum(ivar * x**2.0)
nsteps, nwalkers, ndim = 1000, 100, 10
ivar = 1.0 / np.random.rand(ndim)
start = np.random.randn(nwalkers,ndim)
sampler = zeus.sampler(nwalkers, ndim, log_prob, args=[ivar])
sampler.run_mcmc(start, nsteps)
Read the docs at zeus-mcmc.readthedocs.io
To install zeus using pip run
pip install zeus-mcmc
Please cite Karamanis & Beutler (2020) if you find this code useful in your research. The BibTeX entry for the paper is:
@article{zeus,
title={Ensemble Slice Sampling},
author={Minas Karamanis and Florian Beutler},
year={2020},
eprint={2002.06212},
archivePrefix={arXiv},
primaryClass={stat.ML}
}
Copyright 2019-2020 Minas Karamanis and contributors.
zeus is free software made available under the GPL-3.0 License. For details see the LICENSE
file.