In a multi-class classification setting, how is the accuracy metric defined?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Check this out—accuracy is the simple scoreboard: how many calls did you get right out of everything you tried? Right answers over total answers. That's it. Now if your boss walks in on a fraud model with ninety-nine percent non-fraud cases, ninety-nine percent accuracy might mean you predicted not fraud forever and still look like a hero. Exam loves that trap. Precision is when you cried wolf, were you right? Recall is did you catch the real wolves? F1 mixes those two. Don't mix the names. Land this: accuracy equals correct over total—and always ask whether the class mix makes that number honest. You've got this.
Full explanation below image
Full Explanation
Accuracy is the most intuitive classification metric used in supervised learning evaluation. Count how many predicted labels equal the ground-truth labels, then divide by the number of evaluated samples. In multi-class problems the same definition holds without change. Each sample contributes one correct or incorrect mark regardless of which class it belongs to. On a confusion matrix, accuracy is the sum of the diagonal entries divided by the grand total of all cells in the matrix. For probabilistic classifiers, accuracy is threshold-dependent because you must first map continuous scores to hard class labels, and the metric is only defined after that mapping step is complete and stable.
Precision answers a different question than accuracy. Of the instances labeled positive by the model, what fraction truly were positive? Recall asks a complementary question. Of the instances that truly are positive, what fraction did the model successfully find? The F1 score is the harmonic mean of precision and recall, used when you need a single balance between false positives and false negatives, especially under class imbalance. Substituting those definitions for accuracy is a frequent exam error because all four metrics appear together in evaluation chapters and sound related when you are reading quickly under time pressure.
Accuracy can be misleading when classes are skewed in the evaluation set. A naive majority-class baseline can achieve high accuracy without learning minority patterns that matter operationally, such as rare fraud cases or rare disease cases in screening. In those settings, practitioners report balanced accuracy, macro or micro F1, ROC AUC, precision-recall AUC, or cost-weighted metrics, and they inspect per-class recall carefully before claiming success. Still, accuracy remains valid and useful when classes are roughly balanced, costs of different error types are similar, or stakeholders need a single overall correctness rate for executive communication. Best practice is to state the class distribution beside the accuracy figure and to complement it with metrics aligned to business risk. For the exam, memorize the formula first as correct predictions over total predictions, then immediately ask whether imbalance makes that headline number unsafe to trust alone in a real deployment conversation.