1. Learn
  2. /
  3. Courses
  4. /
  5. Machine Learning with Tree-Based Models in R

Exercise

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", ...

Instructions 1/3

undefined XP
  • 1
    • Calculate the AUC for each prediction column in preds_combined, always using still_customer as the truth column.
  • 2
    • Combine the results into one single tibble.
  • 3
    • Change the code so that the arguments to bind_rows() are named decision_tree, bagged_tree, random_forest, and boosted_tree.