-1
$\begingroup$

I have a huge amount of data and I want to calculate my false positive and false negative. Is there a software that can help me determine it?

$\endgroup$
1
$\begingroup$

Yes, you can use sklearn's confusion_matrix. To explicitly extract the false positives and negatives, you can do

from sklearn.metrics import confusion_matrix

y_true = [0, 1, 0, 1]
y_pred = [1, 1, 1, 0]
tn, fp, fn, tp = confusion_matrix(y_true, y_pred).ravel()
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.