Skip to content

Commit

Permalink
V080 (#369)
Browse files Browse the repository at this point in the history
* Preparing release v080.

* Modify rtd-documents for new methods.

* Update CHANGELOG.rst
  • Loading branch information
hpesonen authored Mar 29, 2021
1 parent 399b94e commit 147206c
Show file tree
Hide file tree
Showing 14 changed files with 653 additions and 36 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Changelog
=========

0.8.0 (2021-03-29)
------------------
- Merge adaptive distance ABC-SMC and ABC-SMC functionalities
- Split `DensityRatioEstimation` from utils.py into separate file
- Refactor parameter_inferency.py into methodtype-wise individual files
Expand Down
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,29 @@ docs: ## generate Sphinx HTML documentation, including API docs
$(MAKE) -C docs html
# $(BROWSER) docs/_build/html/index.html

CONTENT_URL := http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/
CONTENT_URL := https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/

notebook-docs: ## Conver notebooks to rst docs. Assumes you have them in `notebooks` directory.
jupyter nbconvert --to rst ../notebooks/quickstart.ipynb --output-dir docs
sed -i '' 's|\(quickstart_files/quickstart.*\.\)|'${CONTENT_URL}'\1|g' docs/quickstart.rst

jupyter nbconvert --to rst ../notebooks/tutorial.ipynb --output-dir docs/usage
sed -i '' 's|\(tutorial_files/tutorial.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/tutorial.rst
sed -i '' 's|\(tutorial_files/tutorial.*\.\)|'${CONTENT_URL}'\1|g' docs/usage/tutorial.rst

jupyter nbconvert --to rst ../notebooks/adaptive_distance.ipynb --output-dir docs/usage
sed -i '' 's|\(adaptive_distance_files/adaptive_distance.*\.\)|'${CONTENT_URL}'\1|g' docs/usage/adaptive_distance.rst

jupyter nbconvert --to rst ../notebooks/adaptive_threshold_selection.ipynb --output-dir docs/usage
sed -i '' 's|\(adaptive_threshold_selection_files/adaptive_threshold_selection.*\.\)|'${CONTENT_URL}'\1|g' docs/usage/adaptive_threshold_selection.rst

jupyter nbconvert --to rst ../notebooks/BOLFI.ipynb --output-dir docs/usage
sed -i '' 's|\(BOLFI_files/BOLFI.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/BOLFI.rst
sed -i '' 's|\(BOLFI_files/BOLFI.*\.\)|'${CONTENT_URL}'\1|g' docs/usage/BOLFI.rst

jupyter nbconvert --to rst ../notebooks/parallelization.ipynb --output-dir docs/usage
sed -i '' 's|\(parallelization_files/parallelization.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/parallelization.rst
sed -i '' 's|\(parallelization_files/parallelization.*\.\)|'${CONTENT_URL}'\1|g' docs/usage/parallelization.rst

jupyter nbconvert --to rst ../notebooks/non_python_operations.ipynb --output-dir docs/usage --output=external
sed -i '' 's|\(external_files/external.*\.\)|'${CONTENT_URL}usage/'\1|g' docs/usage/external.rst
sed -i '' 's|\(external_files/external.*\.\)|'${CONTENT_URL}'\1|g' docs/usage/external.rst

# release: clean ## package and upload a release
# python setup.py sdist upload
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**Version 0.7.7 released!** See the [CHANGELOG](CHANGELOG.rst) and [notebooks](https://github.com/elfi-dev/notebooks).
**Version 0.8.0 released!** See the [CHANGELOG](CHANGELOG.rst) and [notebooks](https://github.com/elfi-dev/notebooks).

ELFI - Engine for Likelihood-Free Inference
===========================================
Expand Down
8 changes: 8 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Below is a list of inference methods included in ELFI.
elfi.Rejection
elfi.SMC
elfi.AdaptiveDistanceSMC
elfi.AdaptiveThresholdSMC
elfi.BayesianOptimization
elfi.BOLFI
elfi.ROMC
Expand Down Expand Up @@ -205,6 +206,10 @@ Inference API classes
:members:
:inherited-members:

.. autoclass:: elfi.AdaptiveThresholdSMC
:members:
:inherited-members:

.. autoclass:: elfi.BayesianOptimization
:members:
:inherited-members:
Expand Down Expand Up @@ -238,6 +243,9 @@ Inference API classes
:members:
:inherited-members:

.. autoclass:: RomcSample
:members:
:inherited-members:

**Post-processing**

Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def __getattr__(cls, name):
'distributed', 'distributed.client', 'graphviz', 'matplotlib', 'sobol_seq', 'GPy',
'dask.delayed', 'scipy.linalg', 'scipy.optimize', 'scipy.stats', 'scipy.spatial',
'scipy.sparse', 'scipy.special', 'matplotlib.pyplot', 'numpy.random', 'networkx',
'ipyparallel', 'numpy.lib', 'numpy.lib.format', 'sklearn.linear_model'
'ipyparallel', 'numpy.lib', 'numpy.lib.format', 'sklearn.linear_model',
'sklearn.pipeline', 'sklearn.preprocessing'
]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

Expand Down
6 changes: 5 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ Currently implemented LFI methods:

- ABC rejection sampler
- Sequential Monte Carlo ABC sampler
- SMC-ABC sampler with `adaptive distance`_
- ABC-SMC sampler with `adaptive distance`_
- ABC-SMC sampler with `adaptive threshold selection`_
- Bayesian Optimization for Likelihood-Free Inference (BOLFI_) framework
- Robust Optimization Monte Carlo (ROMC_) framework

.. _adaptive distance: https://projecteuclid.org/euclid.ba/1460641065
.. _adaptive threshold selection: https://projecteuclid.org/journals/bayesian-analysis/advance-publication/Adaptive-Approximate-Bayesian-Computation-Tolerance-Selection/10.1214/20-BA1211.full
.. _BOLFI: http://jmlr.org/papers/v17/15-017.html
.. _ROMC: http://proceedings.mlr.press/v108/ikonomov20a.html

Expand Down Expand Up @@ -56,6 +58,8 @@ Additionally, ELFI integrates tools for visualization, model comparison, diagnos
:caption: Usage

usage/tutorial
usage/adaptive_distance
usage/adaptive_threshold_selection
usage/parallelization
usage/BOLFI
usage/external
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ visualize the model:
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/quickstart_files/quickstart_11_0.svg
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/quickstart_files/quickstart_11_0.svg



Expand Down Expand Up @@ -134,5 +134,5 @@ Let’s plot also the marginal distributions for the parameters:
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/quickstart_files/quickstart_16_0.png
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/quickstart_files/quickstart_16_0.png

12 changes: 6 additions & 6 deletions docs/usage/BOLFI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ the basic tutorial, and load it from ready-made examples:
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/usage/BOLFI_files/BOLFI_5_0.svg
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/BOLFI_files/BOLFI_5_0.svg



Expand Down Expand Up @@ -166,7 +166,7 @@ investigated further:
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/usage/BOLFI_files/BOLFI_15_1.png
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/BOLFI_files/BOLFI_15_1.png


It may be useful to see the acquired parameter values and the resulting
Expand All @@ -178,7 +178,7 @@ discrepancies:
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/usage/BOLFI_files/BOLFI_17_0.png
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/BOLFI_files/BOLFI_17_0.png


There could be an unnecessarily high number of points at parameter
Expand Down Expand Up @@ -212,7 +212,7 @@ triangle):
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/usage/BOLFI_files/BOLFI_23_0.png
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/BOLFI_files/BOLFI_23_0.png


Sampling
Expand Down Expand Up @@ -300,7 +300,7 @@ convenience methods:
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/usage/BOLFI_files/BOLFI_29_0.png
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/BOLFI_files/BOLFI_29_0.png


The black vertical lines indicate the end of warmup, which by default is
Expand All @@ -312,5 +312,5 @@ half of the number of iterations.
.. image:: http://research.cs.aalto.fi/pml/software/elfi/docs/0.6.2/usage/BOLFI_files/BOLFI_31_0.png
.. image:: https://raw.githubusercontent.com/elfi-dev/notebooks/dev/figures/BOLFI_files/BOLFI_31_0.png

Loading

0 comments on commit 147206c

Please sign in to comment.