junxnone / aiwiki

AI Wiki
https://junxnone.github.io/aiwiki
17 stars 2 forks source link

ML Metrics #138

Open junxnone opened 2 years ago

junxnone commented 2 years ago

Metrics 评价指标

基本概念

TP/TN/FP/FN

Name Description
T(True) 模型识别正确
F(False) 模型识别错误
P(Positive) 对象本来为正例
N(Negative) 对象本来为负例
TP(True Positive) 对象本来为正例,网络识别为正例
TN(True Negative) 对象本来为负例,网络识别为负例
FP(False Positive) 对象本来为负例,网络识别为正例
FN(False Negative) 对象本来为正例,网络识别为负例

image

Accuracy/Precision/Recall/Fβ

Name Formula Description
Accuracy Accuracy = Ncorrect / NTotal
$\texttt{accuracy}(y, \hat{y}) = \frac{1}{n\text{samples}} \sum{i=0}^{n_\text{samples}-1} 1(\hat{y}_i = y_i)$
预测正确的占总数的比例
Precision $\text{precision} = \frac{tp}{tp + fp}$ 识别为正例的样例中,识别正确的比例
Recall $\text{recall} = \frac{tp}{tp + fn}$ 样本所有正例中,识别正确的比例
Fβ $F_\beta = (1 + \beta^2) \frac{\text{precision} \times \text{recall}}{\beta^2 \text{precision} + \text{recall}}$
F1 当 β = 1 时的 Fβ

PR Curve

fig_1

Image Task Metrics

Name Classification Object Detection Segmentation KeyPoint
Accuracy
Precision
Recall
IoU

Tools

Reference