F值是预测结果的评价尺度之一
我们假设一个2分类器,也就是只能区分TRUE和FALSE
—— | 真实真 | 真实假 |
---|---|---|
预测真 | TP | FP |
预测假 | FN | TN |
TP = True Positive | FN = False Negative |
---|---|
FP = False Positive | TN = True Negative |
TP = True Positive | FN = False Negative |
1.正确率(Accuracy)
正确率简单来讲就是你判断的正确率,也就是说在判断为真或假的当中判断正确的比例。
A c c u r a c y = T P + T N T P + F P + F N + T N Accuracy = \cfrac{TP + TN}{TP + FP + FN + TN} Accuracy=TP+FP+FN+TNTP+TN
2.精度(Precision)
精度表示在预测为真的结果中确实为真的比例
P r e c i s i o n = T P T P + F P Precision = \cfrac{TP}{TP + FP} Precision=TP+FPTP
3.召回率(Recall)
召回率表示在所有为真的数据中,经过预测也判断为真的比例
R e c a l l = T P T P + F N Recall = \cfrac{TP}{TP + FN} Recall=TP+FNTP
4.特效度、特殊度(Specificity)
特效度(特殊度)表示在所有为负的数据中,经过预测也判断为负的比例
S p e c i f i c i t y = F N T N + F P Specificity = \cfrac{FN}{TN + FP} Specificity=TN+FPFN
2.F值(F-measure)
F值定义为‘精度’和‘召回率’的调和平均
F − m e a s u r e = 2 R e c a l l ∗ P r e c i s i o n R e c a l l + P r e c i s i o n F-measure = \cfrac{2Recall * Precision}{Recall + Precision} F−measure=Recall+Precision2Recall∗Precision
F值较高的时候说明试验方法有效,结果比较符合预期