library(tidymodels)
set.seed(123)
cls_split <- initial_split(cls_data_2026, prop = 0.8)
cls_train <- training(cls_split)
cls_test <- testing(cls_split)
set.seed(123)
cls_folds <- vfold_cv(cls_train, v = 10)
# decrease cost_complexity from its default 0.01 to make a more
# complex and performant tree. see `?decision_tree()` to learn more.
tree_spec <- decision_tree(cost_complexity = 0.0001, mode = "classification")
rf_spec <- rand_forest(trees = 1000, mode = "classification")