August 2019
Intermediate to advanced
342 pages
9h 35m
English
Often, between false positives and false negatives, there is a trade-off; reducing the number of false negatives leads to an increase in false positives and to detect the existence of this trade-off, a particular curve is used, known as the ROC curve. This is as shown in the following image:

The ROC curve is calculated using roc_curve() of scikit-learn, which takes the target values and the corresponding probabilities as parameters as shown in the following code:
from sklearn.metrics import roc_curveFPR, TPR, OPC = roc_curve(targets, probs)
Read now
Unlock full access