zeus: Lightning Fast MCMC
Project description
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.
Example
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)
Documentation
Read the docs at zeus-mcmc.readthedocs.io
Installation
To install zeus using pip run
pip install zeus-mcmc
Attribution
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}
}
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
Built Distribution
File details
Details for the file zeus-mcmc-1.2.1.tar.gz
.
File metadata
- Download URL: zeus-mcmc-1.2.1.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0449613776e2b944b21db9990ab34e49f8542b33c238aa79f5367a7dfb12ddea |
|
MD5 | 85f9acc35acb03f034757a31668ba846 |
|
BLAKE2b-256 | 0d2a02d377a6a7d5aba2b5fbf8673947a7a0901c36ebd7344f2439287e633299 |
File details
Details for the file zeus_mcmc-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: zeus_mcmc-1.2.1-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3861b3ba460680d4f7a314faf1e36da9aeb6caf8db83d84d724b0267f8e0070e |
|
MD5 | e3ddfc41ba8a34cbd148120e07e3d5b2 |
|
BLAKE2b-256 | 2b4d8ef87ec9319d0db5c10d8cdb97f88e5d70ad22ad9cc712ae4da6e6edbbb5 |