[英]Sklearn Precision and recall giving wrong values
I see in your comments that you're trying to interpret confusion_matrix as [[tp, fp], [fn, tn]]
我在你的评论中看到你试图将混淆
[[tp, fp], [fn, tn]]
解释为[[tp, fp], [fn, tn]]
Based on documentation , sklearn.confusion_matrix
is a function that returns an array of:根据文档,
sklearn.confusion_matrix
是一个函数,它返回一个数组:
[[tn, fp], [fn, tp]]
So, it's vice-versa and the calculation is right:所以,反之亦然,计算是正确的:
397 / (397 + 925) = 0.30030257...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.