Exercise 1: Why Plain Linear Regression Genuinely Breaks on a Yes/No Target — Possible Solution ==================================================================== WHAT THE CHAPTER SPECIFICALLY CLAIMS ------------------------------ Per this chapter, "fitting ml1-3's own plain linear regression directly against a 0/1-coded target would produce genuine nonsense: nothing stops the fitted line from predicting -0.3 or 1.4 for some employees — numbers with no sensible reading as 'how likely is this person to leave.'" WHY LINEAR REGRESSION CAN PRODUCE THESE VALUES AT ALL ------------------------------ Per ml1-3, linear regression fits an unbounded straight line (or hyperplane): price = w1×mileage + w2×year + b, with no built-in limit on how large or small the output can be — the fitted line is free to extend infinitely in either direction as the input features vary. When the target is 0/1-coded left_company instead of price, the exact same unbounded linear formula still applies — nothing about the fitting process itself knows the target is only ever supposed to be 0 or 1, so it produces whatever real number the linear combination of weighted features happens to compute, with no mechanism preventing that number from landing outside the 0-1 range for some combination of input values. WHY THIS IS A CONCRETE PROBLEM, NOT AN ABSTRACT MISMATCH ------------------------------ A prediction of -0.3 or 1.4 isn't merely "a slightly odd-looking number" — it has no coherent interpretation at all as a probability or as any meaningful prediction about whether someone will leave. Probabilities are only meaningful between 0 (definitely won't happen) and 1 (definitely will happen); a value like -0.3 doesn't correspond to "less than definitely won't happen" in any real sense — it's simply outside the space of values the question "how likely is this person to leave" can even be answered in. This is a genuine, demonstrable failure of the output to mean anything, not a stylistic or conventional mismatch that could be waved away. WHY THIS ISN'T JUST "THE WRONG TOOL IN THE ABSTRACT" ------------------------------ Calling it "the wrong tool" without this explanation would leave a reader without any real reason to believe it — this chapter instead shows a specific, concrete failure mode (predictions escaping the only range in which the target actually makes sense) that follows mechanically and inevitably from linear regression's own unbounded output, rather than asserting a rule to be taken on faith. WHY THIS WORKS AS AN ANSWER ------------------------------ It explains precisely why linear regression's own output is unbounded (per ml1-3's own formula), and explains why a value outside 0-1 isn't just unusual-looking but genuinely uninterpretable as an answer to the actual question being asked, which is exactly the concrete failure this chapter points to rather than a vague tool mismatch.