Version 0.6 released! See the CHANGELOG and notebooks.
ELFI is a statistical software package written in Python for likelihood-free inference (LFI) such as Approximate Bayesian Computation (ABC). The term LFI refers to a family of inference methods that replace the use of the likelihood function with a data generating simulator function. ELFI features an easy to use generative modeling syntax and supports parallelized inference out of the box.
Currently implemented LFI methods:
- ABC Rejection sampler
- Sequential Monte Carlo ABC sampler
- Bayesian Optimization for Likelihood-Free Inference (BOLFI)
Other notable included algorithms and methods:
- Bayesian Optimization
- No-U-Turn-Sampler, a Hamiltonian Monte Carlo MCMC sampler
See examples under notebooks to get started. Full documentation can be found at http://elfi.readthedocs.io/. Limited user-support may be asked from elfi-support.at.hiit.fi, but the Gitter chat is preferable.
ELFI requires and is tested with Python 3.5-3.6. You can install ELFI by typing in your terminal:
pip install elfi
or on some platforms using Python 3 specific syntax:
pip3 install elfi
Note that in some environments you may need to first install numpy
with
pip install numpy
. This is due to our dependency to GPy
that uses numpy
in its installation.
graphviz
for drawing graphical models (needs Graphviz), highly recommended
If you are new to Python, perhaps the simplest way to install a specific version of Python is with Anaconda.
It is very practical to create a virtual Python environment. This way you won't interfere with your default Python environment and can easily use different versions of Python in different projects. You can create a virtual environment for ELFI using anaconda with:
conda create -n elfi python=3.5 numpy
source activate elfi
pip install elfi
ELFI depends on several other Python packages, which have their own dependencies. Resolving these may sometimes go wrong:
- If you receive an error about missing
numpy
, please install it first. - If you receive an error about
yaml.load
, installpyyaml
. - On OS X with Anaconda virtual environment say
conda install python.app
and then usepythonw
instead ofpython
. - Note that ELFI currently supports Python 3.5-3.6 only, although 3.x may work as well,
so try
pip3 install elfi
.