Records the feature schema and per-feature training ranges, then calls fit_model(x, y) on the (optionally
imputed and scaled) numeric matrix. Imputation and scaling use column means / standard deviations learned on x.
Arguments
- x
Training data frame (numeric feature columns).
- y
Outcome vector.
- fit_model
function(x, y)returning afunction(x)that gives the positive-class probability.- feature_names
Columns of
xto use (default: all, in order).- impute
If
TRUE, missing values are replaced by the training column mean.- scale
If
TRUE, features are standardised with the training mean and standard deviation.- metadata
Free-form list stored with the bundle (cohort definition, git sha, training dates, ...).
- strict
If
TRUE(default) columns not in the schema raise an error instead of being dropped.
