August 2019
Intermediate to advanced
342 pages
9h 35m
English
The following code shows how to calculate an ROC curve using the roc_curve() method of scikit-learn:
import numpy as npfrom sklearn.metrics import roc_curvey_true = np.array([0, 1, 1, 1])y_pred = np.array([0.2, 0.7, 0.65, 0.9])FPR, TPR, THR = roc_curve(y_true, y_pred)
Read now
Unlock full access