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.0.tar.gz
(18.2 kB
view details)
Built Distribution
zeus_mcmc-2.1.0-py3-none-any.whl
(31.5 kB
view details)
File details
Details for the file zeus-mcmc-2.1.0.tar.gz
.
File metadata
- Download URL: zeus-mcmc-2.1.0.tar.gz
- Upload date:
- Size: 18.2 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 | 44516b2bc9eae8fa5cfb1fa814bf722d220b970f7e77f1fda44884661ab28ed6 |
|
MD5 | 93a1b4befa73aa4745aaff7fb69de07b |
|
BLAKE2b-256 | 113625e8ace0019dbcbafab1893ddf13185044066809f9226fa01ac650667061 |
File details
Details for the file zeus_mcmc-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: zeus_mcmc-2.1.0-py3-none-any.whl
- Upload date:
- Size: 31.5 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 | 0e892dee0631dd6b8874ee5b6f8dd56ee0fdef6d06cf78490f42bf086944f23c |
|
MD5 | f61dffa1d5b7e1b722179d9f66e45f6d |
|
BLAKE2b-256 | c36be821285fd7492ff4a048fd7cdcb9c67b4808b70004433dd77dd769bffd51 |