Python research code for Bayesian calibration of computer simulators with Gaussian-process emulators and Gaussian-process discrepancy models.
The framework contains modular implementations of standard KOH calibration, scaled-discrepancy calibration, orthogonal discrepancy calibration, randomized tangent-space calibration, probabilistic orthogonal Gaussian closure, and posterior-driven active-learning utilities.
BayesCaliFramework/
ActiveLearning/ Acquisition functions for posterior-driven simulator design
Discrepancy/ GP discrepancy kernels and orthogonal covariance operators
Inference/ Likelihoods, priors, calibrators, and TMCMC samplers
Simulator/ Scalar and field-valued GP emulator utilities
Wrapper/ Higher-level calibration interfaces
demo/ Reproducible example scripts
illustration/ Small scripts for conceptual figures
Generated outputs are intentionally not tracked. Most demo scripts write their
results under a local outputs/ directory.
Clone the repository and install it in editable mode:
git clone https://github.com/bominwang/BayesCaliFramework-Code.git
cd BayesCaliFramework-Code
python -m pip install -e .The core dependencies are listed in requirements.txt. Installing PyTorch may
require choosing the wheel that matches your local CPU/GPU environment.
The high-level wrappers expose the main calibration methods:
from BayesCaliFramework.Wrapper import KOH, OKOH, SKOH, AngularRTKOH
from BayesCaliFramework.Simulator.gp_model import GPModelConfig
from BayesCaliFramework.Simulator.gp_training import ScalarEmulator, ScalarEmulatorConfigTypical workflow:
- Generate or load simulator runs.
- Train a GP emulator with
ScalarEmulatororFieldEmulator. - Choose a calibration wrapper such as
KOH,OKOH,SKOH, orAngularRTKOH. - Run posterior inference with TMCMC.
- Use the posterior samples for prediction, diagnostics, or active learning.
Example scripts are available under BayesCaliFramework/demo/. For example:
python BayesCaliFramework/demo/case01/run_koh.py --help
python BayesCaliFramework/demo/case01/run_okoh.py --help
python BayesCaliFramework/demo/case01/run_rtkoh_pogc.py --helpThe demos are designed as executable research examples. They may take a long time on CPU-only machines because GP training and TMCMC sampling are both computationally intensive.
- This repository contains source code and runnable example scripts only.
- Simulation outputs, posterior samples, generated figures, manuscript files, verification scratch files, and reference PDFs are excluded.
- The code is research-oriented and APIs may change as methods are refined.