zeus: Lightning Fast MCMC
Project description
zeus is a Python implementation of the Ensemble Slice Sampling method.
- Fast & Robust Bayesian Inference,
- Efficient Markov Chain Monte Carlo (MCMC),
- Black-box inference, no hand-tuning,
- Excellent performance in terms of autocorrelation time and convergence rate,
- Scale to multiple CPUs without any extra effort.
Example
For instance, if you wanted to draw samples from a 10-dimensional Gaussian, you would do something like:
import zeus
import numpy as np
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.EnsembleSampler(nwalkers, ndim, log_prob, args=[ivar])
sampler.run_mcmc(start, nsteps)
chain = sampler.get_chain(flat=True)
Documentation
Read the docs at zeus-mcmc.readthedocs.io
Installation
To install zeus
using pip
run:
pip install zeus-mcmc
Attribution
Please cite the following papers if you found this code useful in your research:
@article{zeus,
title={zeus: A Python Implementation of the Ensemble Slice Sampling method},
author={Minas Karamanis and Florian Beutler},
year={2021},
note={in prep}
}
@article{ess,
title={Ensemble Slice Sampling},
author={Minas Karamanis and Florian Beutler},
year={2020},
eprint={2002.06212},
archivePrefix={arXiv},
primaryClass={stat.ML}
}
Licence
Copyright 2019-2021 Minas Karamanis and contributors.
zeus is free software made available under the GPL-3.0 License. For details see the LICENSE
file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zeus-mcmc-2.3.0.tar.gz
(19.5 kB
view hashes)
Built Distribution
zeus_mcmc-2.3.0-py3-none-any.whl
(32.9 kB
view hashes)
Close
Hashes for zeus_mcmc-2.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35f62410f01fd4dbf175e8c4d9db760a2368e28ba0472534b5a83d54dbc534d4 |
|
MD5 | 7f9730d0cd722e8884460bedb703a745 |
|
BLAKE2b-256 | b5a74f017a2bcaf09e4b4ee0b9a0720f6b63bd468638a3431ffce4a59885ca61 |