问题描述
为什么上图中我的精度分数这么低?
解决方法
我在您的评论中看到您试图将混淆_矩阵解释为 [[tp,fp],[fn,tn]]
基于 documentation,sklearn.confusion_matrix
是一个返回数组的函数:
[[tn,tp]]
所以,反之亦然,计算是正确的:
397 / (397 + 925) = 0.30030257...
为什么上图中我的精度分数这么低?
我在您的评论中看到您试图将混淆_矩阵解释为 [[tp,fp],[fn,tn]]
基于 documentation,sklearn.confusion_matrix
是一个返回数组的函数:
[[tn,tp]]
所以,反之亦然,计算是正确的:
397 / (397 + 925) = 0.30030257...