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.2.0.tar.gz
(18.3 kB
view details)
Built Distribution
zeus_mcmc-2.2.0-py3-none-any.whl
(31.6 kB
view details)
File details
Details for the file zeus-mcmc-2.2.0.tar.gz
.
File metadata
- Download URL: zeus-mcmc-2.2.0.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 | 0262f0b584ddd404983c5c97a44f8e89ed981f9c9cc2af6f893ad97d104ac42c |
|
MD5 | d72fc3a4adcd2561221d1cc6be9071a1 |
|
BLAKE2b-256 | 1ba52cf937bee801fb935bd949de28ae5c2cad4956ccb1278c0687cdbc8b4239 |
File details
Details for the file zeus_mcmc-2.2.0-py3-none-any.whl
.
File metadata
- Download URL: zeus_mcmc-2.2.0-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 | 41ceeee680079afb1b1d5563c82a83cb95b8b1f0d128bf8911e0e423fd7f0198 |
|
MD5 | 67ad9bb20af9cb81c843ad135f4b9c0f |
|
BLAKE2b-256 | 44dc0276f331073f5b8eb72daec29876b4fd416247d889301e13331b1f22fe27 |