Contents
Logistic Regression/Chapter 07 of 09
07Common misconceptions
- “Logistic regression is a regression, so it predicts a number.” It predicts a probability, and a class only after a threshold. It is called a regression because the log-odds (3) is a linear function of the inputs.
- “Cross-entropy is just a convention.” It is the negative log-likelihood of the model (Proposition 1); choosing it is choosing maximum likelihood.
- “Squared error cannot fit logistic regression at all.” It can, and on our data it eventually reaches a similar accuracy (88.0\% against 87.9\% after 600 steps). But it is not the likelihood, it learns slowly from confident mistakes, and its surface is not convex.
- “Logistic regression has a closed form, like linear regression.” It does not: the equations X^\top(\sigma(Xw)-y)=0 are nonlinear in w, so the weights are found iteratively (gradient descent, Newton’s method).
- “A convex loss always has a minimum.” Convex means no false bottoms, not that a bottom exists: with perfectly separable classes the loss keeps decreasing as the weights grow (Albert and Anderson, 1984).
- “The threshold is always 0.5.” Only when both errors cost the same; with unequal costs or rare positives, choose it from the costs (Episode 13).