LoslegenKostenlos starten

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.

Diese Übung ist Teil des Kurses

<Kurs>Machine Learning with Tree-Based Models in R</Kurs>
Kurs ansehen

Übungsanweisungen

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

Interaktive praktische Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

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

print(paste("The area under the ROC curve is", round(auc_result$.estimate, 3)))
Code bearbeiten und ausführen