图像检测经典的评估⽅式——PR曲线,ROC曲线
Keywords: PR curve, ROC curve, Machine Learning, image processing
三寄小读者为了帮助⼤家理解,⽐如我们需要检测⼀个图像中的⼈,分类器将图像上的每个像素划分为⼈和⾮⼈像素,⽬标是⼈,所以检测为⼈的像素⽤Positives表⽰,检测为⾮⼈的像素⽤Negatives来表⽰,检测到了需要报告,检测到不是需要拒绝,检测到了实际不是则为误报(错误地报告)或错检(⾮⽬标当成⽬标了),该检测到的没有检测到则为漏报或漏检
True/Fal = 正确地/错误地
安徒生的作者简介
Positives/Negatives = 识别为⽬标/识别为⾮⽬标
这样就容易理解了:
True positives (TP) = 正确地被识别为⽬标 的像素 (正确检出)
谎骗Fal positives (FP) = 错误地被识别为⽬标 的像素(错检,报多了)袜子的英语怎么读
True negatives (TN) = 正确地被识别为⾮⽬标 的像素 (正确拒绝)
足智多谋的意思
Fal negatives (FN) = 错误地被识别为⾮⽬标 的像素 (漏检,报少了)
这些参数是常⽤的评估⽅法的基础。通过这些参数的值我们可以计算出ROC空间和PR空间的⼀个点,多个图像就可以得到多个点,连成曲线就是所谓的ROC曲线和PR曲线。碉怎么读
1. ROC空间(⾯向真实结果Gound Truth)
横轴 Fal Positive Rate (FPR) = ⾮⽬标像素中错检为⽬标的⽐例(越⼩越好)
纵轴 True Positive Rate (TPR) = ⽬标像素中正确检出的⽐例(越⼤越好)小学美术课
2. PR空间(⾯向检测结果的正确性)
养胃吃什么食物横轴 Recall = TPR 实际⽬标像素中正确检出的⽐例(越⼤越好)
纵轴 Precision = 检测出的⽬标像素中正确的⽐例,检测精度(越⼤越好)
总结图
来⾃论⽂The Relationship Between Precision-Recall and ROC Curves
详细讨论可以看论⽂,下⾯引出关键段落
2. Review of ROC and Precision-Recall
In a binary decision problem, a classifier labels ex- amples as either positive or negative.The decision made by the classifier can be reprented in a struc- ture known as a confusion matrix or contingency ta- ble. The confusion matrix has four categories: True positives (TP) are examples correctly labeled as posi- tives. Fal positives (FP) refer to negative examples incorrectly labeled as positive. True negatives (TN) correspond to negatives correctly labeled as negative. Finally, fal negatives (FN) refer to positive examples incorrectly labeled as negative.
A confusion matrix is shown in Figure 2(a). The con- fusion matrix can be ud to construct a point in
either ROC space or PR space. Given the confusion matrix, we are able to define the metrics ud in each space
as in Figure 2(b). In ROC space, one plots the Fal Positive Rate (FPR) on the x-axis and the True Pos- itive Rate (TPR) on the y-axis. The FPR measures
the fraction of negative examples that are misclassi- fied as positive.The TPR measures the fraction of positive examples that are correctly labeled. In PR space, one plots Recall on the x-axis and Precision on the y-axis. Recall is the same as TPR, whereas Pre- cision measures that fraction of examples classified as positive that are truly positive. Figure 2(b) gives the definitions for each metric. We will treat the metrics
as functions that act on the underlying confusion ma- trix which defines a point in either ROC space or PR space. Thus, given a confusion matrix A, RECALL(A) returns the Recall associated with A.