如何从 8x8 混淆矩阵中找到 TP、TN、FP 和 FN 值

How to find TP,TN, FP and FN values from 8x8 Confusion Matrix

我的混淆矩阵如下:

   a b c d e f g h <-- 分类为
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 443 | H

现在如何从这个混淆矩阵中找到真阳性、真阴性、假阳性和假阴性值。 Weka 给我的 TP Rate 和 True positive value 一样吗?

您总共有 8 个 classes:a, b, c, d, e, f, g, h。因此,您将获得 8 个不同的 TP, FP, FN,TN 数字。例如,在 a class、

的情况下
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。它是 RecallTP/TP+FN.

a b c d e f g h <-- 分类为

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