Fit Configuration¶
Source code:
bff/workflows/fit/config.pybff/workflows/fit/main.pybff/bayes/learning.py
Purpose¶
bff fit trains one surrogate model per QoI dataset and writes one .lgp file
per QoI.
Minimal Example¶
log: ./out.log
datasets:
rdf:
data: ../04-analyze/qoi-rdf.pt
mean: sigmoid
fit:
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.fitSurrogate-fitting settings.
datasets.<name> Keys¶
dataQoI dataset file produced bybff analyze.meanMean-function setting passed into surrogate training. Use a numeric constant orsigmoidfor RDF datasets. Python callers offit_surrogates()may also pass a callable mean.nuisanceOptional fixed nuisance standard deviation.modelOptional model output path. Defaults tofit.model_dir/<name>.lgp.
fit Keys¶
model_dirOutput directory for surrogate model files.reuse_modelsReuse existing model files if present.n_hyper_maxMaximum number of training rows used during hyperparameter optimization.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 fit writes one .lgp file per QoI.
Each model file stores the trained committee together with the reference values,
and the number of reference curves. bff learn assigns the effective
observation count from its model configuration.
Warning
Models written before BFF 0.3.0 do not contain the required curve metadata. Refit existing QoI datasets before using them with BFF 0.3.0.