abeec 🐝 --- an ABC sampler
abeec is a sampler to perform Approximate Bayesian Computation (ABC) --- i.e., likelihood free posterior inference! It is based on the algorithm presented in Ishida et al. (2015).
Author: Nestor Espinoza (nespinoza@stsci.edu)
Statement of need
While for Cosmological applications an ABC sampler has already been published by the team of Ishida et al (cosmoabc --- check their repository!),
there was a need to develop a more general scheme to allow some flexibility to the sampler. For instance, doing arbitrary prior distributions (e.g., with priors that might be correlated)
was not straightforward to implement, as well as have external functions for distances and simulators that could all benefit from a common parallelization scheme. On top of that, I wanted
a simple sampler that used the most basic python libraries (e.g., numpy and scipy) at its core. That's where abeec comes into place.
Using the library
To perform ABC on a given dataset, you need three ingredients:
- A
priorfrom which to draw points. - A
distanceto compute distances from simulated datasets to your dataset. - And a
simulator, to simulate datasets to compare against your dataset.
In abeec, it is expected the user will provide classes defining the prior, the distance and the simulator. All the sampler does it take those and apply the iterative importance
sampling scheme outlined in Ishida et al. (2015), giving back a sample from the posterior. Once those classes are written, one might simply run the
sampler as:
import abeec
from your_script import prior, distance, simulator
samples = abeec.sample(prior, distance, simulator)
The best is to check the examples under examples.
Installation
Installation is as simple as:
python setup.py install
Or via PyPi:
pip install abeec
Licence and attribution
Read the LICENCE file for licencing details on how to use the code. If you make use of this code, please cite Ishida et al. (2015) and link back
to this repository.
Metadata
Release files for abeec 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| abeec-0.3.tar.gz | 450.4 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abeec-0.3-py3.7.egg | Legacy Egg format | - | - | Details |
| abeec-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 472.2 kB
Release files / abeec-0.3.tar.gz
| Download URL | abeec-0.3.tar.gz |
|---|---|
| Size | 450.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a622b8542b158503a660443ade901a4f2a5ee56047876db94516e33a7616b60c
|
|
BLAKE2b-256 checksum How to use checksums |
8bf4955141a6c4b79af13341e188e9b6362a772e056b38708a2622da5f2f3c5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
|
Release files / abeec-0.3-py3.7.egg
| Download URL | abeec-0.3-py3.7.egg |
|---|---|
| Size | 13.6 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
38372aba9c0fc5a73e1ce9d5331e38786b7cdf0a4960997a30f2d5e7c7d3aaef
|
|
BLAKE2b-256 checksum How to use checksums |
bbbe039aabfb446ef2ef4beadbefc1244053f2fb34af55bba44172efcfa50a87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
|
Release files / abeec-0.3-py3-none-any.whl
| Download URL | abeec-0.3-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
094327c1f372215ebc9a1f187617e6c11f3fa5e259fe5afcfbd59831e6425f4a
|
|
BLAKE2b-256 checksum How to use checksums |
7fd635eb15d329079c731d98ea992fa5db7349a9bdd05bdcb0436b12d59a4ebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
|
Security for abeec 0.3
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.