# NOT RUN {
### Examples take about 30 seconds to run
# Prepare data for tuning
d <- prep_data(pima_diabetes, patient_id, outcome = diabetes)
# Tune random forest, xgboost, and regularized regression classification models
m <- tune_models(d)
# Get some info about the tuned models
m
# Get more detailed info
summary(m)
# Plot performance over hyperparameter values for each algorithm
plot(m)
# To specify hyperparameter values to tune over, pass a data frame
# of hyperparameter values to the hyperparameters argument:
rf_hyperparameters <-
expand.grid(
mtry = 1:5,
splitrule = c("gini", "extratrees"),
min.node.size = 1
)
grid_search_models <-
tune_models(d = d,
outcome = diabetes,
models = "rf",
hyperparameters = list(rf = rf_hyperparameters)
)
plot(grid_search_models)
# }
Run the code above in your browser using DataLab