My work is to classifiy users' legitimate data from importers' data. I used binary SVM classifier to output probabilites of the two classes. Then used the Roc curve from sklearn to return TPR and FPR vectors over different thresholds as follows:
classifier = SVC(kernel='rbf', probability=True, random_state=0, gamma=0.0001, C=0.5)
classifier.fit(X_train, y_train)
y_probas = classifier.predict_proba(X_test)
fpr, tpr, thresholds = metrics.roc_curve(y_true, y_probas, pos_label=0)
fnr = 1- tpr
The output fpr and tpr vectors are as follows:
However, to compute the EER value, I have googled a lot and found poeple talk about different suggestions. I know that the EER score should be the value when FNR and FPR are equal (or at least the distance between them is minimum as shown in red circle in the image below).
Is this means that the EER = the difference between fnr[%] = 8.33 and fpr[%] = 10.6? I mean EER = (10.6- 8.33) = 2.27%?
Or the minimum value of the two values? I mean EER = 8.33%
Or the average of the two values ? EER = (10.6 + 8.33)/2 = 9.465
I am confused about what is the correct way to compute EER from the best FNR and FPR values.