This object has the results when a CART classification tree model was tuned over the cost-complexity parameter using racing.
Details
To reduce the object size, a smaller subset of the data were used.
The code used to produce this object:
library(tidymodels)
library(finetune)
tidymodels_prefer()
<- control_race(save_pred = TRUE)
ctrl_rc
# ------------------------------------------------------------------------------
data(cells)
set.seed(1)
<-
cells %>%
cells select(-case) %>%
sample_n(200)
# ------------------------------------------------------------------------------
set.seed(2)
<- vfold_cv(cells)
cell_rs
# ------------------------------------------------------------------------------
set.seed(3)
<-
cell_race decision_tree(cost_complexity = tune()) %>%
set_mode("classification") %>%
tune_race_anova(
~ .,
class resamples = cell_rs,
grid = tibble(cost_complexity = 10^seq(-2, -1, by = 0.2)),
control = ctrl_rc
)