Chammarychammary

Stanford CS229 Machine Learning | Spring 2026 | Lecture 4: Exponential Family, GLMs classification

Stanford Online · 1:14:12 · 6 days ago

The exponential family provides a unified mathematical framework that generalizes linear models, enabling consistent learning and inference procedures—such as gradient descent and maximum likelihood estimation—to be applied across diverse data distributions and error types.

  • Unifying Framework — By casting statistical models into a standard functional form, inference tasks like computing expectations or variances become automatic operations .
  • Core Components — The framework relies on three essential elements to define a probability distribution:
    • Sufficient statistic — The measurement captured about the target variable, which often simplifies to an identity function .
    • Base measure — A term that acts as a normalization factor and remains independent of the distribution's parameters .
    • Log partition function — A central term that normalizes the distribution, where differentiation yields the mean and variance .
  • Model Optimization — Generalized linear models link input features to the natural parameter via weights, allowing practitioners to solve for parameters using stochastic gradient descent .
  • Softmax Utility — This technique generalizes logistic regression for multiclass scenarios by normalizing the exponential of linear scores, producing a probability distribution across categories .
  • Label Smoothing — Introducing controlled noise into target labels acts as a form of regularization, preventing models from overfitting and curbing overconfidence in training data .
  • Geometric Interpretation — While low-dimensional visualizations suggest linear models are limited, high-dimensional spaces provide sufficient volume to allow for effective linear separation of data points .

How does the log partition function generate the mean and variance of a distribution? How does label smoothing mitigate overfitting during model training?