Exercise

In-sample ROC and AUC

How well do bagged trees capture the structure of your training set? Are they better than decision trees? Do they overfit? Using ROC and AUC is a great way of assessing this.

In this exercise, you are going to generate these in-sample predictions and calculate their ROC and AUC. Listen up, there will be surprises!

Pre-loaded is the result of the previous exercise, model_bagged, and training data, customers_train.

Instructions

100 XP
  • Use model_bagged to generate probability predictions with your training set and add them to the training set tibble, saving the result as predictions.
  • Generate the ROC curve of the predictions tibble and plot the result.
  • Calculate the AUC of the predictions tibble.