Counting Right and Wrong
Counting Right and Wrong: Accuracy, The Confusion Matrix.
Updated
- Accuracy (Apprentice): Accuracy is the share of a classifier's guesses that are right, worked out by counting matches or with scikit-learn's accuracy_score, and it's a fair first number, but the same accuracy can hide very different mistakes, and a fraud check that never says fraud scores 98% on payments where 2% are fraud.
- The Confusion Matrix (Journeyman): A confusion matrix sorts a classifier's guesses into four counts, true positives, false positives, false negatives and true negatives, so you can see which mistakes it makes, and scikit-learn's confusion_matrix puts the actual class in rows and the guessed class in columns, in sorted label order.