workflow_map() will execute the same function across the workflows in the
set. The various
tune_*() functions can be used as well as
workflow_map( object, fn = "tune_grid", verbose = FALSE, seed = sample.int(10^4, 1), ... )
A workflow set.
A logical for logging progress.
A single integer that is set prior to each function execution.
Options to pass to the modeling function. See details below.
An updated workflow set. The
option column will be updated with
any options for the
tune package functions given to
the results will be added to the
result column. If the computations for a
workflow fail, an
try-catch object will be saved in place of the results
(without stopping execution).
When passing options, anything passed in the
... will be combined with any
values in the
option column. The values in
... will override that
column's values and the new options are added to the
Any failures in execution result in the corresponding row of
In cases where a model has no tuning parameters is mapped to one of the
tune::fit_resamples() will be used instead and a
warning is issued if
verbose = TRUE.
If a workflow required packages that are not installed, a message is printed
workflow_map() continues with the next workflow (if any).
# An example of processed results chi_features_res#> # A workflow set/tibble: 3 x 4 #> wflow_id info option result #> <chr> <list> <list> <list> #> 1 date_lm <tibble[,4] [1 × 4]> <opts> <rsmp[+]> #> 2 plus_holidays_lm <tibble[,4] [1 × 4]> <opts> <rsmp[+]> #> 3 plus_pca_lm <tibble[,4] [1 × 4]> <opts> <tune[+]>