Logistic Regression and Log-Odds

Map a linear score to a probability and interpret what one coefficient means with other feature values held fixed.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. The log of the odds is linear in features
  2. Probability fitting and decision thresholds are separate

The log of the odds is linear in features

With score \(z=\beta^\top x\), the probability model is \(p=1/(1+e^{-z})\). Thus \(p/(1-p)=e^z\). Increasing one feature by one multiplies the modeled odds by \(e^{\beta_j}\) while other features stay fixed. It does not change probability by a constant amount, because the sigmoid slope varies with \(z\). At zero score the predicted probability is one-half.

Probability fitting and decision thresholds are separate

Fit the coefficients by Bernoulli likelihood or its equivalent log-loss objective. Near separability, an unregularized fit may push coefficient magnitudes very large to improve likelihood without a finite optimum. A threshold for converting probabilities to decisions can be selected separately according to the desired cost. Log loss explains which probability the objective rewards. Probability calibration checks whether scores match outcome frequencies in practice.[1][2]

References

  1. Gareth James et al., An Introduction to Statistical Learning ↩
  2. Trevor Hastie, Robert Tibshirani and Jerome Friedman, The Elements of Statistical Learning ↩