Exercise 2: Why Logistic Regression Is Still "Regression" — Possible Solution ==================================================================== WHAT STAYS THE SAME, PER THIS CHAPTER ------------------------------ Per this chapter, "logistic regression keeps ml1-3's own linear combination of weighted features underneath — this is genuinely still 'regression' in that sense, which is exactly why the confusing name persists." The core computation — multiplying each feature by a learned weight and summing them, exactly ml1-3's own w1×feature1 + w2×feature2 + b structure — is completely unchanged between the two techniques. Both fit the same kind of linear combination of features. WHAT CHANGES, PER THIS CHAPTER ------------------------------ Per this chapter, logistic regression "passes the result through the sigmoid function before treating it as an answer" — an additional final step layered on top of the same linear computation, squashing whatever real number the linear combination produces into the (0, 1) range so it can be read as a probability. This is the only structural difference between the two techniques as this chapter describes them. WHY THIS JUSTIFIES KEEPING THE WORD "REGRESSION" ------------------------------ "Regression" refers to the underlying technique of fitting a linear combination of weighted features to data — exactly what both ml1-3's plain linear regression and this chapter's logistic regression do at their core. The sigmoid step doesn't replace that linear fitting process; it's applied AFTER it, transforming the linear combination's own raw output into a probability rather than changing how that raw output itself gets computed and fit. Since the defining "regression" step (fitting linear weights) is identical in both techniques, the name accurately describes what's actually happening underneath, even though the final, sigmoid-transformed output is used to make a category prediction rather than a continuous one. WHY THE NAME STILL CONFUSES MANY LEARNERS ------------------------------ The word "regression" is far more commonly associated with the KIND OF OUTPUT a technique produces (continuous numbers, per ml1-3) than with the specific fitting mechanism used internally — so a technique whose final output is a category (Yes/No) intuitively sounds like it should be called something else, "classification," which is in fact the name of the broader task category logistic regression is actually used for. The name reflects the internal mechanism, not the final task, which is precisely the source of the confusion this chapter's own explanation resolves. WHY THIS WORKS AS AN ANSWER ------------------------------ It identifies precisely what's identical between the two techniques (the linear weighted-feature-combination step) and precisely what's different (the added sigmoid transformation), and explains why the name "regression" tracks the shared internal mechanism rather than the different final output type — which is exactly why the name persists despite being used for a classification task.