这里简单写一下一直让我困惑的两个指标Precision和Recall的理解。
首先看公式:
P
r
e
c
i
s
i
o
n
=
T
P
T
P
+
F
P
Precision = \frac{TP}{TP+FP}
Precision=TP+FPTP
R
e
c
a
l
l
=
T
P
T
P
+
F
N
Recall = \frac{TP}{TP+FN}
Recall=TP+FNTP
- 两个公式分子都是模型预测正确的阳性样本数,即TP。
- Precision是所有模型认为是阳性的样本中TP的比例。
- 而Recall是数据集所有真阳性中TP的比例。
献出关于FP和FN理解的神图。