Catalog PyPI
Back to packageRELEASE DETAILS

0.3

PyPI

abeec

abeec: a library to perform approximate bayesian computation

Published3 May 2021
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 0.3 documentation

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:

  1. A prior from which to draw points.
  2. A distance to compute distances from simulated datasets to your dataset.
  3. 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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.0",
  "evaluation": "NOT_EVALUATED"
}
numpyruntime
scipy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.0",
  "evaluation": "NOT_EVALUATED"
}
scipyruntime

Distribution files

3 collected
abeec-0.3-py3.7.egg

bdist_egg · 13.3 KB · Python 3.7

Source file
abeec-0.3-py3-none-any.whl

bdist_wheel · 8 KB · Python py3

Source file
abeec-0.3.tar.gz

sdist · 439.87 KB · Python source

Source file

Repository

PENDING
nespinoza/abec

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:19 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:2b8fce046b07f7af63b1619d744b3999b7027e8fda955cdfdba562cbfeeaee8d

Other collected versions

View all collected versions →