Get startedGet started for free

Cross-validate a bagged tree model in caret

Use caret::train() with the "treebag" method to perform cross-validation. Train one model maximizing accuracy and one maximizing AUC.

This exercise is part of the course

Machine Learning with Tree-Based Models in R

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise