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)
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={2020},
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-2020 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.1.1.tar.gz
(18.3 kB
view details)
Built Distribution
zeus_mcmc-2.1.1-py3-none-any.whl
(31.6 kB
view details)
File details
Details for the file zeus-mcmc-2.1.1.tar.gz
.
File metadata
- Download URL: zeus-mcmc-2.1.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff4a46b24fe0dff7b715fa887616a958612f49914e5d2905c0111221a6d5bbe3 |
|
MD5 | 9c033df6be7616468da606e5a777fdec |
|
BLAKE2b-256 | 858842334a07548a9b3117d37ce24062d0a203329c96eb0eae02cbcca01b9e1d |
File details
Details for the file zeus_mcmc-2.1.1-py3-none-any.whl
.
File metadata
- Download URL: zeus_mcmc-2.1.1-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b13a9fd49b7208eb62c7ecf141b9d07a8553d230a35169d7c0021cfbd611862 |
|
MD5 | 3972f651901ddabc88d983f5dfaf55bf |
|
BLAKE2b-256 | b620405d9652e74087ed37be24f2c07d571e5aee9c19fad1ef9487d12bb10bff |