autoemulate.calibration.bayes#
- class BayesianCalibration(emulator, parameter_range, observations, observation_noise=0.1, calibration_params=None, device=None, log_level='progress_bar')[source]#
Bases:
TorchDeviceMixin
Bayesian calibration using Markov Chain Monte Carlo (MCMC).
Bayesian calibration estimates the probability distribution over input parameters given observed data, providing uncertainty estimates.
- model(predict=False)[source]#
Pyro model.
- Parameters:
predict (bool) – Whether to run the model with existing samples to generate posterior predictive distribution. Used with pyro.infer.Predictive.
- run_mcmc(warmup_steps=500, num_samples=1000, num_chains=1, initial_params=None, sampler='nuts', **sampler_kwargs)[source]#
Run Markov Chain Monte Carlo (MCMC). Defaults to using the NUTS sampler.
- Parameters:
warmup_steps (int) – Number of warm up steps to run per chain (i.e., burn-in). These samples are discarded. Defaults to 500.
num_samples (int) – Number of samples to draw after warm up. Defaults to 1000.
num_chains (int) – Number of parallel chains to run. Defaults to 1.
initial_params (dict[str, TensorLike] | None) – Optional dictionary specifiying initial values for each calibration parameter per chain. The tensors must be of length num_chains.
sampler (str) – The MCMC kernel to use, one of “hmc”, “nuts” or “metropolis”.
- Returns:
The Pyro MCMC object. Methods include summary() and get_samples().
- Return type:
MCMC