https://github.com/ucl/calibr
Parallelized Bayesian calibration of simulations using Gaussian process emulation
https://github.com/ucl/calibr
bayesian-inference calibration emulation high-performance-computing
Last synced: 25 days ago
JSON representation
Parallelized Bayesian calibration of simulations using Gaussian process emulation
- Host: GitHub
- URL: https://github.com/ucl/calibr
- Owner: UCL
- License: mit
- Created: 2023-12-22T13:26:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-26T17:01:52.000Z (12 months ago)
- Last Synced: 2024-04-27T16:48:34.130Z (12 months ago)
- Topics: bayesian-inference, calibration, emulation, high-performance-computing
- Language: Python
- Homepage: http://github-pages.ucl.ac.uk/calibr/
- Size: 651 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
# calibr
[](https://github.com/pre-commit/pre-commit)
[![Tests status][tests-badge]][tests-link]
[![Linting status][linting-badge]][linting-link]
[![Documentation status][docs-badge]][docs-link]
[![License][license-badge]](./LICENSE.md)
[](https://github-pages.ucl.ac.uk/calibr/)[tests-badge]: https://github.com/UCL/calibr/actions/workflows/tests.yml/badge.svg
[tests-link]: https://github.com/UCL/calibr/actions/workflows/tests.yml
[linting-badge]: https://github.com/UCL/calibr/actions/workflows/linting.yml/badge.svg
[linting-link]: https://github.com/UCL/calibr/actions/workflows/linting.yml
[docs-badge]: https://github.com/UCL/calibr/actions/workflows/docs.yml/badge.svg
[docs-link]: https://github.com/UCL/calibr/actions/workflows/docs.yml
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/calibr
[conda-link]: https://github.com/conda-forge/calibr-feedstock
[pypi-link]: https://pypi.org/project/calibr/
[pypi-platforms]: https://img.shields.io/pypi/pyversions/calibr
[pypi-version]: https://img.shields.io/pypi/v/calibr
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svgParallelized Bayesian calibration of simulations using Gaussian process emulation.
`calibr` is a Python implementation of the algorithm described in _Parallel Gaussian
process surrogate Bayesian inference with noisy likelihood evaluations_ (Järvenpää,
Gutmann, Vehtari and Marttinen; 2021)
([doi:10.1214/20-BA1200](https://doi.org/10.1214/20-BA1200),
[arxiv:1905.01252](https://arxiv.org/abs/1905.01252)). It is designed to allow
estimation of the posterior distribution on the unknown parameters of expensive to
evaluate simulator models given observed data, using a batch sequential design strategy
which iterates fitting a Gaussian process emulator to a set of evaluations of the
(unnormalized) posterior density for the model and using the emulator to identify a new
batch of model parameters at which to evaluate the posterior density which minimize a
measure of the expected uncertainty in the emulation of the posterior density.The posterior density can be evaluated at the parameter values in each batch in
parallel, providing the opportunity for speeding up calibration runs on multi-core and
multi-node high performance computing systems. The acquisition functions used to choose
new parameter values to evaluate are implemented using the high-performance numerical
computing framework [JAX](https://jax.readthedocs.io/en/latest/), with the
gradient-based optimization of these acquisition functions exploiting JAX's support for
automatic differentiation.The package is still in the early stages of development, with only a subset of the
algorithmic variants proposed by Järvenpää, Gutmann, Vehtari and Marttinen (2021)
currently implemented. In particular there is no support yet for models with noisy
likelihood evaluations. Expect lots of rough edges!This project is developed in collaboration with the [Centre for Advanced Research Computing](https://ucl.ac.uk/arc), University College London.
## Getting started
### Prerequisites
`calibr` requires Python 3.10–3.12.
### Installation
We recommend installing in a project specific virtual environment created using a environment management tool such as [Mamba](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) or [Conda](https://conda.io/projects/conda/en/latest/). To install the latest development version of `calibr` using `pip` in the currently active environment run
```sh
pip install git+https://github.com/UCL/calibr.git
```Alternatively create a local clone of the repository with
```sh
git clone https://github.com/UCL/calibr.git
```and then install in editable mode by running
```sh
pip install -e .
```### Documentation
Documentation for the package is available at .
### Running tests
Tests can be run across all compatible Python versions in isolated environments using
[`tox`](https://tox.wiki/en/latest/) by running```sh
tox
```To run tests manually in a Python environment with `pytest` installed run
```sh
pytest tests
```again from the root of the repository.
### Building documentation
The MkDocs HTML documentation can be built locally by running
```sh
tox -e docs
```from the root of the repository. The built documentation will be written to
`site`.Alternatively to build and preview the documentation locally, in a Python
environment with the optional `docs` dependencies installed, run```sh
mkdocs serve
```## Acknowledgements
This work was funded by a grant from the ExCALIBUR programme.