Description Usage Arguments Details Value
'tune“ is a generic function that accepts a tibble of resampling partitions generated by the resampling schemes available in the 'rsample' package. A 'parsnip' model specification and a 'recipes' recipe also need to be supplied to this function, along with a 'yardstick' scoring function. The 'param_grid' function accepts a 'grid_regular' or 'grid_random' object of tuning parameters generated by the 'dials' package. Hyperparameter tuning is then performed on this object, which is returned as a tibble with an additional list-column called 'tune_scores' containing the tuning scores.
1 2 |
resamples |
tibble generated by rsample containing resamplign scheme |
object |
parsnip model specification, or a pipeline object |
recipe |
recipe object, optional if using a pipeline |
param_grid |
dials grid_regular or grid_random object |
scoring |
yardstick scoring function |
maximize |
logical, maximize the scoring function, default = TRUE |
.options |
future_options to pass additional packages required by tuning and fitting functions |
If the resampling object represents a 'nested_cv' object, then hyperparameter tuning is performed on the inner resampling partitions, and best best hyperparameters per outer fold are also returned as additional columns in the output tibble.
tibble containing resampling results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.