Skip to main content

Eryn: a multi-purpose MCMC sampler

Eryn is an advanced MCMC sampler. It has the capability to run with parallel tempering, multiple model types, and unknown counts within each model type using Reversible Jump MCMC techniques. Eryn is heavily based on emcee. The emcee base structure with the Ensemble Sampler, State objects, proposal setup, and storage backends is carried over into Eryn with small changes to account for the increased complexity. In a simple sense, Eryn is an advanced (and slightly more complicated) version of emcee.

If you use Eryn in your publication, please cite the paper arXiv:2303.02164, its zenodo, and emcee. The documentation for Eryn can be found here: mikekatz04.github.io/Eryn. You will find the code on Github: github.com/mikekatz04/Eryn.

Getting Started

Below is a quick set of instructions to get you started with eryn.

pip install eryn

To import eryn:

from eryn.ensemble import EnsembleSampler

See examples notebook for more info. You can also navigate the Documentation pages.

Prerequisites

Eryn has only a few python-based dependencies: tqdm, corner for plotting, numpy, matplotlib.

Installing

If you are not planning to develop the code, you can just install the latest version with the pip installation technique given above. Otherwise, you can just clone the repo and run pip install . inside of the Eryn directory. To run tests on Eryn during development, you can run the following in the main Eryn directory:

python -m unittest discover

Running the Tests

In the main directory of the package run in the terminal:

python -m unittest discover

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us. See CONTRIBUTORS for those that have authored code for and contributed to Eryn.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Citation

When using this package, please cite at minimum the following sources:

@article{Karnesis:2023ras,
    author = "Karnesis, Nikolaos and Katz, Michael L. and Korsakova, Natalia and Gair, Jonathan R. and Stergioulas, Nikolaos",
    title = "{Eryn : A multi-purpose sampler for Bayesian inference}",
    eprint = "2303.02164",
    archivePrefix = "arXiv",
    primaryClass = "astro-ph.IM",
    month = "3",
    year = "2023"
}

@software{michael_katz_2023_7705496,
  author       = {Michael Katz and
                  Nikolaos Karnesis and
                  Natalia Korsakova},
  title        = {mikekatz04/Eryn: first full release},
  month        = mar,
  year         = 2023,
  publisher    = {Zenodo},
  version      = {v1.0.0},
  doi          = {10.5281/zenodo.7705496},
  url          = {https://doi.org/10.5281/zenodo.7705496}
}

@ARTICLE{2013PASP..125..306F,
       author = {{Foreman-Mackey}, Daniel and {Hogg}, David W. and {Lang}, Dustin and {Goodman}, Jonathan},
        title = "{emcee: The MCMC Hammer}",
      journal = {\pasp},
     keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Physics - Computational Physics, Statistics - Computation},
         year = 2013,
        month = mar,
       volume = {125},
       number = {925},
        pages = {306},
          doi = {10.1086/670067},
archivePrefix = {arXiv},
       eprint = {1202.3665},
 primaryClass = {astro-ph.IM},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2013PASP..125..306F},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Depending on which proposals are used, you may be required to cite more sources. Please make sure you do this properly.

License

This project is licensed under the GNU License - see the LICENSE.md file for details.

Acknowledgments

  • We wish to thank S. Babak, M. Le Jeune, S. Marsat, T. Littenberg, and N. Cornish for their useful comments and very fruitful discussions.
  • N Stergioulas and N Karnesis acknowledge support from the Gr-PRODEX 2019 funding program (PEA 4000132310).

Metadata

Release files for eryn 1.2.6

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

Source distribution (sdist)

Source distribution for eryn 1.2.6
File Size Uploaded Provenance
eryn-1.2.6.tar.gz 105.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for eryn 1.2.6
File Interpreter ABI Platform
eryn-1.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 232.7 kB

Release files / eryn-1.2.6.tar.gz

Download URL eryn-1.2.6.tar.gz
Size 105.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2243169160028b0bdbdf6a24592763d2c177dd22f7bb858a3da1c9f5f7863e39
BLAKE2b-256 checksum
How to use checksums
11e9ea8c5a408a0025bf6107301bebafa09c9ff1baf3c689e82706f312ab3623
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / eryn-1.2.6-py3-none-any.whl

Download URL eryn-1.2.6-py3-none-any.whl
Size 127.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0faed637a9588dac979ea020df7b16059679ee24ba6f0632710eb122b0de0f80
BLAKE2b-256 checksum
How to use checksums
461448db303c869ac69c52ea691034dae6e0f9753d15c95b38098ab467eaf4b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for eryn 1.2.6

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