Skip to content
ELFI - Engine for Likelihood-Free Inference
Python C++ Other
Branch: dev
Clone or download
Latest commit 8ba3b62 Mar 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update PULL_REQUEST_TEMPLATE.md Jul 13, 2017
docs
elfi Bump version (#303) Mar 7, 2019
scripts PEP8 fix (#225) Aug 16, 2017
tests Fix lint (#302) Mar 7, 2019
.dockerignore Improve Dockerfile for testing (#284) Aug 15, 2018
.gitattributes Add configuration to change basis for detected language (Jupyter Jan 26, 2017
.gitignore API documentation continued (#168) Jun 6, 2017
.travis.yml
CHANGELOG.rst Bump version (#303) Mar 7, 2019
CONTRIBUTING.rst
Dockerfile Add docker commands to Makefile, update instructions, set locale (#287) Sep 19, 2018
LICENSE Text updates for release 0.3 Jan 23, 2017
MANIFEST.in Update changelog, prepare for 0.5 (#163) May 19, 2017
Makefile Add docker commands to Makefile, update instructions, set locale (#287) Sep 19, 2018
README.md Bump version (#303) Mar 7, 2019
requirements-dev.txt Add posterior metropolis sampler (#296) Jan 21, 2019
requirements.txt Restrict networkX to <2.0 for now (#241) Sep 28, 2017
setup.cfg Fix PEP8: imports, docstrings (#226) Aug 22, 2017
setup.py Update description in setup.py (#291) Aug 30, 2018
tox.ini Add tox configuration Oct 27, 2016

README.md

Version 0.7.4 released! See the CHANGELOG and notebooks.

NOTE: For the time being NetworkX 2 is incompatible with ELFI.

ELFI - Engine for Likelihood-Free Inference

Build Status Code Health Documentation Status Gitter DOI

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:

Other notable included algorithms and methods:

ELFI also integrates tools for visualization, model comparison, diagnostics and post-processing.

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.

Installation

ELFI requires Python 3.5 or greater. 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.

Optional dependencies

  • graphviz for drawing graphical models (needs Graphviz), highly recommended

Installing Python 3

If you are new to Python, perhaps the simplest way to install a specific version of Python is with Anaconda.

Virtual environment using 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

Docker container

A simple Dockerfile with Jupyter support is also provided. This is especially suitable for running tests. Please see Docker documentation for details.

git clone --depth 1 https://github.com/elfi-dev/elfi.git
cd elfi
make docker-build  # builds the image with requirements for dev
make docker  # runs a container with live elfi directory

To open a Jupyter notebook, run

jupyter notebook --ip 0.0.0.0 --no-browser --allow-root

within the container and then on host open the page http://localhost:8888.

Potential problems with installation

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, install pyyaml.
  • On OS X with Anaconda virtual environment say conda install python.app and then use pythonw instead of python.
  • Note that ELFI requires Python 3.5 or greater so try pip3 install elfi.
  • Make sure your Python installation meets the versions listed in requirements.txt.

Citation

If you wish to cite ELFI, please use the paper in JMLR:

@article{JMLR:v19:17-374,
  author  = {Jarno Lintusaari and Henri Vuollekoski and Antti Kangasr{\"a}{\"a}si{\"o} and Kusti Skyt{\'e}n and Marko J{\"a}rvenp{\"a}{\"a} and Pekka Marttinen and Michael U. Gutmann and Aki Vehtari and Jukka Corander and Samuel Kaski},
  title   = {ELFI: Engine for Likelihood-Free Inference},
  journal = {Journal of Machine Learning Research},
  year    = {2018},
  volume  = {19},
  number  = {16},
  pages   = {1-7},
  url     = {http://jmlr.org/papers/v19/17-374.html}
}
You can’t perform that action at this time.