Accuracy: a correct answer can hide a failed detector
Accuracy is the fraction of predictions that match their target labels. Each example contributes equally, so a common class can dominate the score.
Imagine 1,000 messages, only ten of them spam. A classifier that always says “not spam” reaches 99% accuracy while catching none of the spam. Accuracy answers how often the system is right; it does not tell you which mistakes it makes.
Compare the decision with the baseline
This NumPy example compares two sets of illustrative model decisions. The second detector catches every positive but introduces twenty false alarms.
import numpy as np
target = np.zeros(1000, dtype=bool)
target[:10] = True
baseline = np.zeros_like(target)
detector = baseline.copy()
detector[:30] = True
accuracy = [(pred == target).mean() for pred in (baseline, detector)]
recall = [(pred & target).sum() / target.sum() for pred in (baseline, detector)]
accuracy favours the useless baseline, while positive-class recall exposes the difference. Neither result is a complete ranking: the cost of missed spam versus false alarms determines the useful operating point.
For multiclass tasks, inspect results per class as well as overall. In multilabel classification, specify whether accuracy requires the entire label set to match or scores individual labels.