|
Performance Measures for Classification Algorithms |
|
|
|
Basic Definitions |
||
|
Confusion Matrix: Algorithms are usually tested with some test-data (where we know what classes should have been given by the algorithm), after which a confusion matrix can be constructed by counting how many times the algorithm recognised class A as class B (with A potentially equal to B). If we have just one class (or are interested in one class), the matrix looks like this:
|
||
|
Accuracy |
||
|
The sum of the diagonal elements in the confusion matrix / sum of all elements in the confusion matrix, or correct predictions / all predictions
|
||
| Precision/Recall Curve | ||
|
The terminology comes from document retrieval, where Precision tells how many of the returned documents are correct, and Recall tells how many of the positives the model returns:
The plot is created by dividing the algorithm's output prediction (expected to be in [0,1]) up into sub-domains, calculate both precision and recall for that sub-domain, and connect the plot-points to get to a curve:
|
||
| Receiver Operator Characteristic Curve (ROC Curve) | ||
|
ROC Curves were developed in WWII to statistically model false positive and false negative detections of radar operators. It plots Sensitivity vs 1-Specificity:
Similar to the Precision-Recall Curve, we can divide the algorithm's output prediction up into sub-domains to get to the ROC curve plot: Properties:
|
||
| Links | ||
Compiled by Kristof Van Laerhoven.