Train Configuration¶
Source code:
bff/workflows/configs.pybff/workflows/train.pybff/bayes/learning.py
Purpose¶
bff train fits one surrogate model per QoI dataset and writes one .lgp file
per QoI.
Minimal Example¶
log: out.log
datasets:
rdf:
data: ../03-qoi/qoi-rdf.pt
mean: sigmoid
training:
model_dir: ./models
reuse_models: true
committee_size: 1
device: cuda
Top-Level Keys¶
logWorkflow log file.datasetsNon-empty mapping from QoI name to dataset settings.trainingSurrogate-training settings.
datasets.<name> Keys¶
dataQoI dataset file produced bybff qoi.meanMean-function setting passed into surrogate training.nuisanceOptional fixed nuisance standard deviation.observation_scaleOptional scaling applied to the effective observation count in the likelihood.modelOptional model output path. Defaults totraining.model_dir/<name>.lgp.
training Keys¶
model_dirOutput directory for surrogate model files.reuse_modelsReuse existing model files if present.n_hyper_maxMaximum number of hyperparameter optimization steps.committee_sizeNumber of committee members for model averaging.test_fractionHeld-out validation fraction.deviceTorch device, for examplecpuorcuda.- any additional keys Forwarded as optimization keyword arguments.
Outputs¶
bff train writes one .lgp file per QoI.
Each model file stores:
- the trained committee
- the effective observation count used in the likelihood
- the reference observation vector needed later by
bff learn