Compare to a single classifier
You learned that boosted trees are among the best machine learning algorithms available. To underpin that, you will now compare the AUC of a boosted model to a simple decision tree classifier.
In this exercise, you will use the whole machine-learning pipeline from specification to evaluation.
The training data customers_train
is still pre-loaded.
This exercise is part of the course
Machine Learning with Tree-Based Models in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
set.seed(100)
# Specify, fit, predict, and combine with training data
predictions <- boost_tree() %>%
set_mode("___") %>%
set_engine("___") %>%
fit(still_customer ~ ., data = ___) %>%
predict(new_data = ___, type = "___") %>%
bind_cols(___)
# Calculate AUC
roc_auc(___,
truth = ___,
estimate = ___)