Generalized Linear Models › Components of GLMs
Machine Learning from ScratchAll chapters 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 . GLMs assume that 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:
where:
- is the linear predictor (a scalar value for a single observation, or a vector for multiple observations)
- is the intercept term (the expected response when all features equal zero)
- are the regression coefficients for each feature (quantify the effect of each feature on the linear predictor)
- are the feature values (predictor variables for a single observation)
- is the number of features (total count of predictor variables in the model)
This is identical to the linear predictor in ordinary linear regression.
3. Link Function
The link function connects the linear predictor to the expected value of the response :
where:
- is the link function (a monotonic, differentiable transformation that maps the mean response to the linear predictor scale)
- is the expected value (mean) of the response variable (the parameter we're modeling)
- is the linear predictor from the systematic component (the right-hand side of the equation: )
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.