Get startedGet started for free

Area under the ROC curve

The area under the ROC curve boils down many other performance estimates to one single number and allows you to assess a model's performance very quickly. For this reason, it is a very common performance measure for classification models.

Using AUC, you can rate the performance of a model using a grading system, where A is the best grade:

AUC Grade
0.9 - 1 A
0.8 - 0.9 B
0.7 - 0.8 C
0.6 - 0.7 D
0.5 - 0.6 E

You are going to calculate your model's AUC using the predictions tibble from the last exercise, which is still loaded.

This exercise is part of the course

Machine Learning with Tree-Based Models in R

View Course

Exercise instructions

  • Calculate the area under the ROC curve using the roc_auc() function and the predictions tibble.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate area under the curve
auc_result <- ___(___, 
                  estimate = ___, 
                  truth = ___)

print(paste("The area under the ROC curve is", round(auc_result$.estimate, 3)))
Edit and Run Code