Generalized Linear Models › Components of GLMs

Michael BrenndoerferApril 1, 20252 min read
Machine Learning from ScratchAll chapters
Part 4 of 9Regression Models
Chapter 40Generalized Linear Models › Components of GLMs
Reading section 2 of 12 · Components of GLMs · 2 minSection 2 of 12 · 2 min

Book contents

Section 2 of 12 · 2 min read

Generalized Linear Models › Components of GLMsOne section · Sections in this chapter2 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

A Generalized Linear Model consists of three main components:

1. Random Component (Distribution)

The random component specifies the probability distribution of the response variable YY. GLMs assume that YY follows a distribution from the exponential family, which includes:

  • Normal (Gaussian): For continuous data
  • Binomial: For binary data (success/failure)
  • Poisson: For count data
  • Gamma: For positive continuous data
  • Inverse Gaussian: For positive continuous data with specific variance properties

2. Systematic Component (Linear Predictor)

The systematic component is the linear combination of features:

η=β0+β1x1+β2x2+⋯+βpxp\eta = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_p x_p

where:

  • η\eta is the linear predictor (a scalar value for a single observation, or a vector for multiple observations)
  • β0\beta_0 is the intercept term (the expected response when all features equal zero)
  • β1,β2,…,βp\beta_1, \beta_2, \ldots, \beta_p are the regression coefficients for each feature (quantify the effect of each feature on the linear predictor)
  • x1,x2,…,xpx_1, x_2, \ldots, x_p are the feature values (predictor variables for a single observation)
  • pp is the number of features (total count of predictor variables in the model)

This is identical to the linear predictor in ordinary linear regression.

The link function g(⋅)g(\cdot) connects the linear predictor η\eta to the expected value of the response μ=E[Y]\mu = E[Y]:

g(μ)=ηg(\mu) = \eta

where:

  • g(⋅)g(\cdot) is the link function (a monotonic, differentiable transformation that maps the mean response to the linear predictor scale)
  • μ=E[Y]\mu = E[Y] is the expected value (mean) of the response variable YY (the parameter we're modeling)
  • η\eta is the linear predictor from the systematic component (the right-hand side of the equation: β0+β1x1+⋯+βpxp\beta_0 + \beta_1 x_1 + \cdots + \beta_p x_p)

The link function transforms the expected response so that it can be modeled linearly. Different GLM families use different link functions appropriate for their response distributions.