Exercise 1: How a Model That Learns Nothing Scores 90% Accuracy — Possible Solution ==================================================================== WHAT THE ACCURACY-PARADOX WARN-BOX DESCRIBES ------------------------------ Per this chapter, "if 90% of employees in the data actually stayed, a model that predicts 'No, they won't leave' for absolutely everyone — never once actually examining salary, tenure, or department — scores 90% accuracy without learning anything at all." WORKING THROUGH THE ARITHMETIC ------------------------------ Accuracy, per this chapter, is "(correct predictions) ÷ (total predictions)." If 90 out of 100 employees in the dataset genuinely stayed and 10 genuinely left, a model that predicts "No" for every single employee, with zero regard for any of their actual features, will be correct on all 90 of the employees who really did stay (since it predicted "No" and they really did stay) and wrong on all 10 who actually left (since it predicted "No" but they actually left). That's 90 correct predictions out of 100 total — exactly 90% accuracy, achieved entirely by exploiting the class imbalance rather than by learning any real relationship between the features and the outcome. WHY THIS MODEL "LEARNED NOTHING" DESPITE THE HIGH SCORE ------------------------------ This hypothetical model never uses salary, department, tenure, or any other feature at all — it simply outputs the same fixed answer regardless of input, exploiting the fact that "No" happens to be correct for the large majority of cases in this specific dataset. A genuinely useless model — one providing zero actual predictive insight — can still achieve a seemingly impressive accuracy score purely as a mathematical consequence of how skewed the two classes are. WHY THIS MAKES ACCURACY ALONE UNTRUSTWORTHY FOR THIS SPECIFIC DATA ------------------------------ ml1-5 itself flagged attrition as "genuinely imbalanced — far more No than Yes in most real companies." Because the "predict everything as No" strategy already produces a high accuracy score purely from that imbalance, a real, trained model's own accuracy number can't be trusted at face value to indicate genuine skill — a model could be doing barely better than this trivial, feature-blind strategy while still reporting an accuracy score that sounds impressive in isolation. Only by comparing a model's own performance against this "always predict the majority class" baseline — or by using metrics that specifically examine how well the minority class (people who actually left) is being identified, like precision and recall — can a reader tell whether a high accuracy number reflects real learning or just the underlying imbalance. WHY THIS WORKS AS AN ANSWER ------------------------------ It works through the exact arithmetic behind the chapter's own 90% figure, explains precisely why a feature-blind model achieves that score purely from class imbalance, and connects this directly to why ml1-5's own imbalanced attrition data makes accuracy specifically untrustworthy as a standalone metric here.