FFR and FAR calculating for multiclasss biometric face recognition system
I am implementing a face recognition system using facenet and svc Ml algorithm i have like 20 classes or more and I'm getting 98% accuracy im trying to calculate the FAR and FRR and the EER I'm assuming that the threshold is the probability of predicting is that correct ?
this is the code for calculating the FP,FN,TP,TN
FP = matrics.sum(axis=0) - np.diag(matrics)
FN = matrics.sum(axis=1) - np.diag(matrics)
TP = np.diag(matrics)
TN = matrics.sum() - (FP + FN + TP)
TPR = TP/(TP+FN)
cm = ConfusionMatrix(testy, yhat_test)
how to calculate FAR FRR EER from these ? i tried using the probability predictions for each FP,FN,TP,TN like this
a =[]
for i in range(len(TP)):
a.append(max(yhat_prob[TP[i]]))
print(a)
the output is :
0.6994577123013918, 0.6994577123013918, 0.4916665680599575,
0.6994577123013918, 0.6994577123013918, 0.6994577123013918,
0.30549183912100375, 0.30549183912100375, 0.30549183912100375,
0.30549183912100375, 0.30549183912100375, 0.32500348178885874,
0.30549183912100375, 0.4916665680599575, 0.30549183912100375,
0.30549183912100375, 0.30549183912100375, 0.6994577123013918,
0.30549183912100375]
and I don't know what to do next in case this is correct
Topic bioinformatics evaluation machine-learning
Category Data Science