| Literature DB >> 34917933 |
Khashayar Namdar1,2, Masoom A Haider3,4, Farzad Khalvati1,2.
Abstract
Receiver operating characteristic (ROC) curve is an informative tool in binary classification and Area Under ROC Curve (AUC) is a popular metric for reporting performance of binary classifiers. In this paper, first we present a comprehensive review of ROC curve and AUC metric. Next, we propose a modified version of AUC that takes confidence of the model into account and at the same time, incorporates AUC into Binary Cross Entropy (BCE) loss used for training a Convolutional neural Network for classification tasks. We demonstrate this on three datasets: MNIST, prostate MRI, and brain MRI. Furthermore, we have published GenuineAI, a new python library, which provides the functions for conventional AUC and the proposed modified AUC along with metrics including sensitivity, specificity, recall, precision, and F1 for each point of the ROC curve.Entities:
Keywords: AUC; CNN; ROC; binary classification; loss function
Year: 2021 PMID: 34917933 PMCID: PMC8670229 DOI: 10.3389/frai.2021.582928
Source DB: PubMed Journal: Front Artif Intell ISSN: 2624-8212
Possible outcomes of binary classification.
|
|
| |
| TN | 0 | 0 |
| FP | 0 | 1 |
| FN | 1 | 0 |
| TP | 1 | 1 |
Example 1.
|
|
|
|
|
|
|
| ||||
|
|
|
| ||
|
|
Example 2.
|
|
|
|
|
|
|
|
|
| ||
|
|
| |||
|
| ||||
|
|
|
|
|
|
|
|
|
| ||
|
|
| |||
|
| ||||
|
|
|
|
| |
|
| ||||
|
|
|
| ||
|
|
FIGURE 1ROC of Example 2.
Example 3.
|
|
|
|
|
|
|
|
|
| ||
|
|
| |||
|
| ||||
|
|
|
|
|
|
|
|
|
| ||
|
|
| |||
|
| ||||
|
|
|
|
| |
|
| ||||
|
|
|
| ||
|
|
FIGURE 2ROC of Example 3.
Example 4.
|
|
|
|
|
|
|
|
|
| ||
|
|
| |||
|
| ||||
|
|
|
|
|
|
|
|
| |||
|
|
| |||
|
|
FIGURE 3ROC of Example 4.
FIGURE 4ROC of Example 5.
FIGURE 5ROC curves for N = 3, two actual negative and an actual positive.
Example 5.
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
| |
|
| ||||
|
|
|
|
| |
|
|
| |||
|
|
|
| ||
|
| ||||
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
| |
|
| ||||
|
|
|
|
| |
|
|
| |||
|
|
|
| ||
|
|
A group of realizations with N = 3, AN = 2, and AP = 1.
| — | t | ||
|---|---|---|---|
| Sorted Actual Values | 0 | 0 | 1 |
| Predicted Probabilities | p-ε | p-ε | p |
| — | TN | TN | TP |
A group of realizations with N = 8, AN = 4, AP = 4, and AUC = 1.
| — | — | — | t | — | — | — | ||
|---|---|---|---|---|---|---|---|---|
| Sorted Actual Values | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| Sorted Probabilities | p-ε-3δ | p-ε-2δ | p-ε-δ | p-ε | p | p+δ | p+2δ | p+3δ |
| — | TN | TN | TN | TN | TP | TP | TP | TP |
A group of realizations with N = 8, AN = 4, AP = 4, and AUC = 0.
| — | — | — | t | — | — | — | ||
|---|---|---|---|---|---|---|---|---|
| Sorted actual values | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| Sorted probabilities | p-3δ | p-2δ | p-δ | p | p-ε | p-ε+δ | p-ε+2δ | p-ε+3δ |
| — | FP | FP | FP | FP | FN | FN | FN | FN |
A group of realizations with N = 8, AN = 4, AP = 4, and 0 < AUC<1.
| (a) | — | — | — | — | t | — | — | — | ||
| sorted Actual values | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | ||
| sorted Probabilities | p-ε-2δ | p-ε-δ | p-ε | p | p | p+δ | p+2δ | p+3δ | ||
| — | TN | TN | TN | TP | TP | TP | ||||
| (b) | — | — | — | t | — | — | — | — | ||
| sorted Actual values | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | ||
| sorted Probabilities | p-ε-2δ | p-ε-δ | p-ε | p | p | p+δ | p+2δ | p+3δ | ||
| — | TN | TN | TN | FP | TP | TP | TP | TP | ||
| (c) | — | — | — | — | — | t | — | — | ||
| sorted Actual values | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | ||
| sorted Probabilities | p-ε-2δ | p-ε-δ | p-ε | p | p | p+δ | p+2δ | p+3δ | ||
| — | TN | TN | TN | TN | FN | TP | TP | TP | ||
FIGURE 6ROC of Example of Table 10.
FIGURE 7ROC curves for two different models with N = 7.
Comparison of AUC and the proposed AUC for a random case.
| Real values | Sorted probabilities | Parameters |
|---|---|---|
| 1 | 0.803258838 |
|
| 0 | 0.517853202 |
|
|
| ||
| 1 | 0.639592674 | |
|
| ||
| 1 | 0.303745995 | |
| — | ||
| 0 | 0.699606458 | |
| 0 | 0.318090495 | |
| 0 | 0.277593543 | |
| 1 | 0.421482502 | |
| 1 | 0.556011119 | |
| 1 | 0.548716153 |
FIGURE 8Classification results on the MINIST-based dataset.
FIGURE 9Classification results on the PCa dataset.
FIGURE 10Classification results on our BraTS-based dataset.