Examining a receiver operating characteristic and the area under a curve

The receiver operating characteristic (ROC) is a plot of the recall (10.3) and the false positive rate (FPR) of a binary classifier. The FPR is given by the following equation:

Examining a receiver operating characteristic and the area under a curve

In this recipe, we will plot the ROC for the various classifiers we used in Chapter 9, Ensemble Learning and Dimensionality Reduction. Also, we will plot the curve associated with random guessing and the ideal curve. Obviously, we want to beat the baseline and get as close as possible to the ideal curve.

The area under the curve (AUC, ROC AUC, or AUROC) is another evaluation metric that summarizes the ...

Get Python Data Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.