0
$\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 Answer 1

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$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .