qudsif
qudsif

Reputation: 93

Sklearn Precision and recall giving wrong values

enter image description here

Why is my precision score so low in the above image?

Upvotes: 0

Views: 614

Answers (1)

Punker
Punker

Reputation: 1878

I see in your comments that you're trying to interpret confusion_matrix as [[tp, fp], [fn, tn]]

Based on documentation, sklearn.confusion_matrix is a function that returns an array of:

[[tn, fp], [fn, tp]]

So, it's vice-versa and the calculation is right:

397 / (397 + 925) = 0.30030257...

Upvotes: 5

Related Questions