Compare AUC
Comparing different models is the core of model selection. In the final two exercises, you'll perform a model comparison across all types of models in this course: decision trees, bagged trees, random forests, and gradient boosting.
The models were all tuned to perfection and trained on the same training set, customers_train
, and predictions were made for the customers_test
dataset. The results are numeric probabilities and are available as preds_combined
in your session:
tibble [1,011 × 5]
$ preds_tree : 0.144 0.441 ...
$ preds_bagging : 0.115 0.326 ...
$ preds_forest : 0 0 0 0.286 ...
$ preds_boosting: 0.136 0.149 ...
$ still_customer: "no","no", ...
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.
# Calculate the AUC for each model
auc_tree <- ___(preds_combined, truth = ___, estimate = ___)
auc_bagged <- ___(preds_combined, truth = ___, estimate = ___)
auc_forest <- ___(preds_combined, truth = ___, estimate = ___)
auc_boost <- ___(preds_combined, truth = ___, estimate = ___)
# Print the results
auc_tree
auc_bagged
auc_forest
auc_boost