Sklearn Precision 和召回给出错误的值

问题描述

enter image description here

为什么上图中我的精度分数这么低?

解决方法

我在您的评论中看到您试图将混淆_矩阵解释为 [[tp,fp],[fn,tn]]

基于 documentationsklearn.confusion_matrix 是一个返回数组的函数:

[[tn,tp]]

所以,反之亦然,计算是正确的:

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