Control aspects of the grid search process
control_grid( verbose = FALSE, allow_par = TRUE, extract = NULL, save_pred = FALSE, pkgs = NULL ) control_resamples( verbose = FALSE, allow_par = TRUE, extract = NULL, save_pred = FALSE, pkgs = NULL )
A logical for logging results as they are generated. Despite
this argument, warnings and errors are always shown. If using a dark IDE
theme, some logging messages might be hard to see. If this is the case,
try setting the
A logical to allow parallel processing (if a parallel backend is registered).
An optional function with at least one argument (or
A logical for whether the out-of-sample predictions should be saved for each model evaluated.
An optional character string of R package names that should be loaded (by namespace) during parallel processing.
extract, this function can be used to output the model object, the
recipe (if used), or some components of either or both. When evaluated, the
function's sole argument has a fitted workflow If the formula method is used,
the recipe element will be
The results of the
extract function are added to a list column in the
.extracts. Each element of this list is a tibble with tuning
parameter column and a list column (also called
.extracts) that contains
the results of the function. If no extraction function is used, there is no
.extracts column in the resulting object. See
tune_bayes() for more
Note that for
collect_predictions(), it is possible that each row of the
original data point might be represented multiple times per tuning
parameter. For example, if the bootstrap or repeated cross-validation are
used, there will be multiple rows since the sample data point has been
evaluated multiple times. This may cause issues when merging the predictions
with the original data.
control_resamples() is an alias for
control_grid() and is meant to be