我有如下混淆矩阵:
a b c d e f g h <-- classified as
1086 7 1 0 2 4 0 0 | a
7 1064 8 6 0 2 2 0 | b
0 2 1091 2 3 0 1 1 | c
0 8 0 1090 1 1 0 0 | d
1 1 1 1 597 2 2 0 | e
4 2 1 0 3 1089 0 1 | f
0 2 1 3 0 0 219 0 | g
0 0 1 0 1 4 1 443 | h
现在如何从这个混淆矩阵中找到真阳性,真阳性,假阳性和假阴性值。 Weka给我的TP Rate与True正值相同?
答案 0 :(得分:4)
您共有8个班级:a, b, c, d, e, f, g, h
。因此,您将获得8个不同的TP, FP, FN,
和TN
个数字。例如,在a
类的情况下,
TP (instance belongs to a, classified as a) = 1086
FP (instance belongs to others, classified as a) = 7 + 0 + 0 + 1 + 4 + 0 + 0 = 12
FN (instance belongs to a, classified as others) = 7 + 1 + 0 + 2 + 4 + 0 + 0 = 14
TN (instance belongs to others, classified as others) = Total instance - (TP + FP + FN)
TP rate
不是TP
。它是Recall
或TP/TP+FN
。
答案 1 :(得分:0)
a b c d e f g h&lt; - 分类为
1086 7 1 0 2 4 0 0 |一个
7 1064 8 6 0 2 2 0 | b
0 2 1091 2 3 0 1 1 | c
0 8 0 1090 1 1 0 0 | d
1 1 1 1 597 2 2 0 | e
4 2 1 0 3 1089 0 1 | f
0 2 1 3 0 0 219 0 | g
0 0 1 0 1 4 1 0 | h