August 2019
Intermediate to advanced
342 pages
9h 35m
English
In the following example code, we can see how to calculate the AUC curve using the roc_auc_score() method of scikit-learn:
import numpy as npfrom sklearn.metrics import roc_auc_scorey_true = np.array([0, 1, 1, 1])y_pred = np.array([0.2, 0.7, 0.65, 0.9])roc_auc_score(y_true, y_pred)
Read now
Unlock full access