How to compute Equal Error Rate (EER) on ROC curve
Receiver operating characteristic(ROC) curve is “a graphical plot that illustrates the performance of a binary classifier system as its discrimination threshold is varied” (see wikipedia).
After some thoughts, I have the following one-liner in Python:
from scipy.optimize import brentq from scipy.interpolate import interp1d eer = brentq(lambda x : 1. - x - interp1d(fpr, tpr)(x), 0., 1.) thresh = interp1d(fpr, thresholds)(eer)
thresholds are the returns of function