
Wrap Model$fit() to fit, validate and store multiple models
training_camp.RdGiven a data set and a list of Models, call Model$fit() for
all of them. If an error occurs while fitting a model, you can skip to the next
model.
Usage
training_camp(
model_list,
data,
skip_on_error = TRUE,
update_model_shell = FALSE,
quiet = FALSE
)Arguments
- model_list
list of
Modelobjects. The models to fit.- data
Data object. Its
cohortattribute must be set. Fit the models to thecohortofdata.- skip_on_error
logical. Whether to skip to the next model if an error occurs while fitting a model.
- update_model_shell
logical. If
TRUEand, for aModelinmodel_list, we find a stored version withfit_objnot beingNULL, we set thefit_objattribute of theModelto the foundfit_objand save it. This way, we can update the model shell, which we want to do if changes were made to theModelclass.- quiet
logical. Whether to suppress messages. Default is
FALSE.