Confusion matrix
Negative | Positive | |
---|---|---|
Negative | True Negative (TN) | False Positive (FP) |
Positive | False Negative (FN) | True Positive (TP) |
Accuracy
Represents the number of correctly classified data instances over total number of data instances
Not a good metric when data set is unbalanced where both negative and positive classes have different number of data instances
- e.g. 90 TN, 10 FN, 0 TP and FP will still result in 90% accuracy despite 100% of positive being classified as negative
Precision
Also known as the positive predictive value
Precision should ideally be 1, when
Recall
Also known as the sensitivity or true positive rate
Recall should ideally be 1, when
In an ideal classifier, precision and recall should be one. Hence, we should find a metric that takes into account both precision and recall.
F1 Score
F1 score only becomes high when both precision and recall are high.
Also known as the harmonic mean of precision and recall.
Specificity
Measures the ability to correctly identify negative instances. Also known as the true negative rate