我运行的是支持向量机-轻型分类器,但是它输出的召回/精确行似乎损坏了:
Reading model...OK. (20 support vectors read)
Classifying test examples..100..200..done
Runtime (without IO) in cpu-seconds: 0.00
Accuracy on test set: 95.50% (191 correct, 9 incorrect, 200 total)
Precision/recall on test set: 0.00%/0.00%我应该配置什么来获得有效的精确度和召回?
发布于 2015-04-15 00:04:54
例如,如果分类器总是预测"-1“--负类;但是,测试数据集包含191 "-1”和9 "+1“作为黄金标签,您将得到191个正确的分类,其中9个不正确。
True positives : 0 (TP)
True negatives : 191 (TN)
False negatives: 9 (FN)
False positives: 0 (FP)
Thus:
TP 0
Precision = ----------- = --------- = undefined
TP + FP 0 + 0
TP 0
Recall = ----------- = --------- = 0
TP + FN 0 + 9从上面的公式中,您知道只要您的TP为零,您的精确度/召回就会为零或未定义。
要进行调试,您应该输出(针对每个测试示例)黄金标签和预测标签,以便知道问题所在。
发布于 2016-03-24 17:14:27
谢谢你的灰心。你的回答对我也有帮助。为避免此问题,请确保选择/分组测试和培训数据集,使其具有公平的正负混合值。
https://stackoverflow.com/questions/29634695
复制相似问题