Tune hyperparameters for a model using grid search
tl_tune_grid(
data,
formula,
method,
param_grid,
folds = 5,
metric = NULL,
maximize = NULL,
verbose = TRUE,
...
)A list with the best model and tuning results
A data frame containing the training data
A formula specifying the model
The modeling method to tune
A named list of parameter values to tune
Number of cross-validation folds
Metric to optimize
Logical; whether to maximize (TRUE) or minimize (FALSE) the metric
Logical; whether to print progress
Additional arguments passed to tl_model