Skip to main content

logo

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,
  • Automated Convergence diagnostics.

GitHub arXiv arXiv ascl Build Status License: GPL v3 Documentation Status Downloads

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

To install zeus in a [Ana]Conda environment use:

conda install -c conda-forge zeus-mcmc

Attribution

Please cite the following papers if you found this code useful in your research:

@article{karamanis2021zeus,
  title={zeus: A Python implementation of Ensemble Slice Sampling for efficient Bayesian parameter inference},
  author={Karamanis, Minas and Beutler, Florian and Peacock, John A},
  journal={arXiv preprint arXiv:2105.03468},
  year={2021}
}

@article{karamanis2020ensemble,
    title = {Ensemble slice sampling: Parallel, black-box and gradient-free inference for correlated & multimodal distributions},
    author = {Karamanis, Minas and Beutler, Florian},
    journal = {arXiv preprint arXiv: 2002.06212},
    year = {2020}
}

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.

Metadata

Release files for zeus-mcmc 2.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zeus-mcmc 2.5.4
File Size Uploaded Provenance Actions
zeus-mcmc-2.5.4.tar.gz 35.1 kB Without provenance Details for zeus-mcmc-2.5.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zeus-mcmc 2.5.4
File Interpreter ABI Platform Actions
zeus_mcmc-2.5.4-py3-none-any.whl Python 3 none any Details for zeus_mcmc-2.5.4-py3-none-any.whl

Total release size: 59.2 kB

Release files / zeus-mcmc-2.5.4.tar.gz

Download URL zeus-mcmc-2.5.4.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
594baa90de4ad4488c4db5ed6a0446f7103bc4b3de787f4d7d23c91c9aa88769
BLAKE2b-256 checksum
How to use checksums
15c0248a600ae0f3d1437612821f7c528c895b6a8408a052c352d4cac46dcf94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / zeus_mcmc-2.5.4-py3-none-any.whl

Download URL zeus_mcmc-2.5.4-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a64a7dae15f413200c6d590a3edfc3b8bc63c6bea3acdf123c0397c8089e123f
BLAKE2b-256 checksum
How to use checksums
48cb99ee8021fa305d65b1fb369fabf96ccc65c60282407390e5355bb9e62f9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for zeus-mcmc 2.5.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page