gp_active_mcmc
gp_active_mcmc couples Gaussian-process surrogates with active/adaptive MCMC
to accelerate Bayesian inference when high-fidelity forward models are expensive.
The library lets you:
- build POD–GP surrogates from snapshot data,
- run delayed-acceptance or adaptive-subchain samplers backed by
tinyDA, - instrument HF usage, surrogate error, and posterior summaries for publications.
Pick your starting point
| Workflow | Where to look | Runtime budget |
|---|---|---|
| Surrogate-only experimentation | Tutorials → Forward toy | seconds |
| Active / adaptive inference demos | Tutorials → Backward toy | minutes |
| CFD benchmark (FEniCS/DOLFINx) | Tutorials → Navier-Stokes & examples/navier_stokes/ |
hours |
Install quickstart
The tested stack (pinned for tinyDA/GPy stability):
- Python
3.10.19, NumPy1.26.4, SciPy1.12.0 - scikit-learn
1.7.2, tinyDA0.9.21 - Ray
2.53.0(indirect requirement of tinyDA) - GPy
1.13.2
git clone https://github.com/filippozacchei/MFDA_ActiveLearning.git
cd MFDA_ActiveLearning
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
python examples/toy_problem/run_forward_toy.py
macOS-specific setup (Apple Silicon and Intel):
xcode-select --install
brew install python@3.10
git clone https://github.com/filippozacchei/MFDA_ActiveLearning.git
cd MFDA_ActiveLearning
python3.10 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e .
Documentation stack:
python -m pip install -e ".[docs]"
mkdocs serve # open http://127.0.0.1:8000
Testing stack (optional):
python -m pip install -e ".[test]"
python -m pytest -q
Navier–Stokes scripts additionally require a conda-forge environment with fenics-dolfinx=0.9.0,
mpich, gmsh=4.15.0, python-gmsh=4.15.0, and pyvista.
Documentation map
- User Guide → conceptual overview and workflow rationale.
- Tutorials → executable notebooks for toy and CFD examples (rendered via
mkdocs-jupyter). - API Reference → autogenerated docs for
gp_active_mcmc.surrogates,.inference,.diagnostics, and.utils.
Community & governance
- Contributions follow CONTRIBUTING and are linted/tested via
nox. - Behavior in GitHub issues/PRs is governed by the Code of Conduct.
- Citation details live in CITATION.cff.
References
- MCMC-guided active learning with Gaussian-process surrogates — primary reference for the active-learning scheme adopted here.
- Delayed-acceptance MLDA / tinyDA framework — details the underlying sampler infrastructure we rely on.
Ready to dive in? Start with the Quickstart guide below.
Next: User Guide → Quickstart