Skip to content

Commit f8d88c4

Browse files
authored
Merge pull request #201 from elfi-dev/dev
Release 0.6
2 parents a13e831 + 9191800 commit f8d88c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+7203
-3346
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ var/
2828
.installed.cfg
2929
*.egg
3030

31+
# Images
32+
*.png
33+
*.svg
34+
*.jpg
35+
*.jpeg
36+
3137
# PyInstaller
3238
# Usually these files are written by a python script from a template
3339
# before PyInstaller builds the exe, so as to inject date/other infos into it.

.travis.yml

+22-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
1-
language: python
2-
python:
3-
- "3.5"
1+
matrix:
2+
include:
3+
- os: linux
4+
language: python
5+
python: 3.5
6+
- os: linux
7+
language: python
8+
python: 3.6
9+
- os: osx
10+
language: generic
11+
before_install:
12+
- mkdir -p /Users/travis/.matplotlib
13+
- "echo 'backend: TkAgg' > /Users/travis/.matplotlib/matplotlibrc"
14+
- brew update
15+
- brew install python3
16+
- virtualenv env -p python3
17+
- source env/bin/activate
18+
419
cache: pip
5-
# command to install dependencies
20+
621
install:
722
- pip install numpy
823
- pip install -r requirements-dev.txt
924
- pip install -e .
10-
# command to run tests
25+
1126
script:
1227
- ipcluster start -n 2 --daemon
13-
- travis_wait 20 make test
28+
#- travis_wait 20 make test
29+
- make test

CHANGELOG.md CHANGELOG.rst

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
1-
# Change Log
1+
Changelog
2+
==========
3+
4+
5+
0.6 (2017-07-03)
6+
----------------
7+
8+
- Changed some of the internal variable names in methods.py. Most notable outputs is now
9+
output_names.
10+
- methods.py renamed to parameter_inference.py
11+
- Changes in elfi.methods.results module class names:
12+
- OptimizationResult (a new result type)
13+
- Result -> Sample
14+
- ResultSMC -> SmcSample
15+
- ResultBOLFI -> BolfiSample
16+
- Changes in BO/BOLFI:
17+
- take advantage of priors
18+
- take advantage of seed
19+
- improved optimization scheme
20+
- bounds must be a dict
21+
- two new toy examples added: Gaussian and the Ricker model
222

323
0.5 (2017-05-19)
424
----------------
25+
526
Major update, a lot of code base rewritten.
627

728
Most important changes:
29+
830
- revised syntax for model definition (esp. naming)
931
- scheduler-independent parallelization interface (currently supports native & ipyparallel)
1032
- methods can now be run iteratively
@@ -19,12 +41,14 @@ See the updated notebooks and documentation for examples and details.
1941

2042
0.3.1 (2017-01-31)
2143
------------------
44+
2245
- Clean up requirements
2346
- Set graphviz and unqlite optional
2447
- PyPI release (pip install elfi)
2548

2649
0.2.2 - 0.3
2750
-----------
51+
2852
- The inference problem is now contained in an Inference Task object.
2953
- SMC-ABC has been reimplemented.
3054
- Results from inference are now contained in a Result object.

Makefile

+21-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: clean clean-test clean-pyc clean-build docs help
1+
.PHONY: clean clean-test clean-pyc clean-build docs notebook-docs help
22
.DEFAULT_GOAL := help
33
define BROWSER_PYSCRIPT
44
import os, webbrowser, sys
@@ -64,16 +64,28 @@ coverage: ## check code coverage quickly with the default Python
6464
$(BROWSER) htmlcov/index.html
6565

6666
docs: ## generate Sphinx HTML documentation, including API docs
67-
rm -f docs/elfi.rst
68-
rm -f docs/elfi.bo.rst
69-
rm -f docs/modules.rst
70-
sphinx-apidoc -o docs/ elfi
7167
$(MAKE) -C docs clean
68+
$(MAKE) notebook-docs
7269
$(MAKE) -C docs html
73-
$(BROWSER) docs/_build/html/index.html
70+
# $(BROWSER) docs/_build/html/index.html
7471

75-
servedocs: docs ## compile the docs watching for changes
76-
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
72+
CONTENT_URL := http://research.cs.aalto.fi/pml/software/elfi/docs/0.6/
73+
74+
notebook-docs: ## Conver notebooks to rst docs. Assumes you have them in `notebooks` directory.
75+
jupyter nbconvert --to rst ../notebooks/quickstart.ipynb --output-dir docs
76+
sed -i '' 's|\(quickstart_files/quickstart.*\.\)|'${CONTENT_URL}'\1|g' docs/quickstart.rst
77+
78+
jupyter nbconvert --to rst ../notebooks/tutorial.ipynb --output-dir docs/usage
79+
sed -i '' 's|\(tutorial_files/tutorial.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/tutorial.rst
80+
81+
jupyter nbconvert --to rst ../notebooks/BOLFI.ipynb --output-dir docs/usage
82+
sed -i '' 's|\(BOLFI_files/BOLFI.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/BOLFI.rst
83+
84+
jupyter nbconvert --to rst ../notebooks/parallelization.ipynb --output-dir docs/usage
85+
sed -i '' 's|\(parallelization_files/parallelization.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/parallelization.rst
86+
87+
jupyter nbconvert --to rst ../notebooks/non_python_operations.ipynb --output-dir docs/usage --output=external
88+
sed -i '' 's|\(external_files/external.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/external.rst
7789

7890
# release: clean ## package and upload a release
7991
# python setup.py sdist upload
@@ -90,4 +102,4 @@ install: clean ## install the package to the active Python's site-packages
90102
pip install -e .
91103

92104
dev: install ## install the development requirements to the active Python's site-packages
93-
pip install -Ur requirements-dev.txt
105+
pip install -r requirements-dev.txt

README.md

+16-23
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1+
**Version 0.6 released!** See the CHANGELOG and [notebooks](https://github.com/elfi-dev/notebooks).
2+
13
ELFI - Engine for Likelihood-Free Inference
24
===========================================
35

46
[![Build Status](https://travis-ci.org/elfi-dev/elfi.svg?branch=master)](https://travis-ci.org/elfi-dev/elfi)
5-
[![Code Health](https://landscape.io/github/elfi-dev/elfi/master/landscape.svg?style=flat)](https://landscape.io/github/elfi-dev/elfi/master)
7+
[![Code Health](https://landscape.io/github/elfi-dev/elfi/dev/landscape.svg?style=flat)](https://landscape.io/github/elfi-dev/elfi/dev)
68
[![Documentation Status](https://readthedocs.org/projects/elfi/badge/?version=latest)](http://elfi.readthedocs.io/en/latest/?badge=latest)
79
[![Gitter](https://badges.gitter.im/elfi-dev/elfi.svg)](https://gitter.im/elfi-dev/elfi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
810

911
<img src="https://cloud.githubusercontent.com/assets/1233418/20178983/6e22ee44-a75c-11e6-8345-5934b55b9dc6.png" width="15%" align="right"></img>
1012

11-
ELFI is a statistical software package written in Python for performing inference with
12-
generative models. The term "likelihood-free inference" refers to a family of inference
13-
methods that replace the use of the likelihood function with a data generating simulator
14-
function. This is useful when the likelihood function is not computable or otherwise
15-
available but it is possible to make simulations of the process.
16-
17-
Other names or related approaches to likelihood-free inference include Approximative
18-
Bayesian Computation ([ABC](https://en.wikipedia.org/wiki/Approximate_Bayesian_computation)),
19-
simulator-based inference, approximative Bayesian inference, indirect inference, etc.
20-
21-
**Note:** Versions 0.5+ introduce small but significant changes in syntax. See the [notebooks](https://github.com/elfi-dev/notebooks).
13+
ELFI is a statistical software package written in Python for likelihood-free inference (LFI) such as Approximate
14+
Bayesian Computation ([ABC](https://en.wikipedia.org/wiki/Approximate_Bayesian_computation)).
15+
The term LFI refers to a family of inference methods that replace the use of the likelihood function with a data
16+
generating simulator function. ELFI features an easy to use generative modeling syntax and supports parallelized
17+
inference out of the box.
2218

23-
Currently implemented ABC methods:
19+
Currently implemented LFI methods:
2420
- ABC Rejection sampler
2521
- Sequential Monte Carlo ABC sampler
2622
- [Bayesian Optimization for Likelihood-Free Inference (BOLFI)](http://jmlr.csail.mit.edu/papers/v17/15-017.html)
@@ -29,12 +25,6 @@ Other notable included algorithms and methods:
2925
- Bayesian Optimization
3026
- [No-U-Turn-Sampler](http://jmlr.org/papers/volume15/hoffman14a/hoffman14a.pdf), a Hamiltonian Monte Carlo MCMC sampler
3127

32-
ELFI includes an easy to use generative modeling syntax, where the generative model is
33-
specified as a directed acyclic graph (DAG). The data generation process can then be
34-
automatically parallelized from multiple cores up to a cluster environment. ELFI also
35-
handles seeding the random number generators and storing of the generated data for you so
36-
that you can easily repeat or fine tune your inference.
37-
3828
See examples under [notebooks](https://github.com/elfi-dev/notebooks) to get started. Full
3929
documentation can be found at http://elfi.readthedocs.io/. Limited user-support may be
4030
asked from elfi-support.at.hiit.fi, but the
@@ -45,11 +35,15 @@ is preferable.
4535
Installation
4636
------------
4737

48-
ELFI requires and is tested with Python 3.5.
38+
ELFI requires and is tested with Python 3.5-3.6. You can install ELFI by typing in your terminal:
4939

5040
```
5141
pip install elfi
5242
```
43+
or on some platforms using Python 3 specific syntax:
44+
```
45+
pip3 install elfi
46+
```
5347

5448
Note that in some environments you may need to first install `numpy` with
5549
`pip install numpy`. This is due to our dependency to `GPy` that uses `numpy` in its installation.
@@ -59,9 +53,8 @@ Note that in some environments you may need to first install `numpy` with
5953
- `graphviz` for drawing graphical models (needs [Graphviz](http://www.graphviz.org)), highly recommended
6054

6155

62-
### Python 3
56+
### Installing Python 3
6357

64-
On some platforms you may have to use `pip3 install elfi`, in order to use Python 3.
6558
If you are new to Python, perhaps the simplest way to install a specific version of Python
6659
is with [Anaconda](https://www.continuum.io/downloads).
6760

@@ -85,5 +78,5 @@ Resolving these may sometimes go wrong:
8578
- If you receive an error about `yaml.load`, install `pyyaml`.
8679
- On OS X with Anaconda virtual environment say `conda install python.app` and then use
8780
`pythonw` instead of `python`.
88-
- Note that ELFI currently supports Python 3.5 only, although 3.x may work as well,
81+
- Note that ELFI currently supports Python 3.5-3.6 only, although 3.x may work as well,
8982
so try `pip3 install elfi`.

0 commit comments

Comments
 (0)