Exercise

Draw the ROC curve

Visualizing model performance with a ROC curve allows you to gather the performance across all possible thresholds into a single plot. It shows the sensitivity and specificity for every threshold. The more "up and left" a ROC curve is, the better the model.

You are going to predict class probabilities of credit card customers having churned and plot the results as a ROC curve.

Pre-loaded is a model, which is a decision tree that was trained on the credit card customers training set, and the test data, customers_test.

Instructions

100 XP
  • Use model to predict class probabilities on the test set.
  • Add the results to the test set using bind_cols() and save the result as predictions.
  • Calculate the ROC curve of the result.
  • Plot the ROC curve using autoplot().