Generalized Additive Models › Summary
Machine Learning from ScratchAll chapters Generalized Additive Models › SummarySection view · Sections in this chapter9 / 10 ↓
Reading tools Definitions, links & notes
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 additive model is the natural upgrade of linear and spline regression when multiple predictors each have non-linear effects but no interaction structure. The additive predictor is connected to the response mean via a link function , allowing the same machinery to handle Gaussian, binary, count, and other response types. Each smooth is expanded in a spline basis, and a difference penalty regularizes how wiggly the resulting curve can be, turning the Gaussian identity-link fit into a penalized least-squares problem. After identifiability constraints, an invertible penalized system has the solution
which is structurally identical to ridge regression on an expanded feature space. For non-identity links, a weighted penalized system reappears inside an IRLS loop for suitable non-Gaussian GLMs.
The worked procedure selects a shared smoothing parameter by cross-validation within training data, fitting the basis and centering inside every fold, then scores once on independent synthetic test observations. Other smoothness-selection criteria answer related questions under their own assumptions. Interpretation is done by plotting each component separately after centering it to have zero mean, and reading off the effect on the scale of the link function. The additive restriction excludes interactions unless they are included explicitly. When interactions are suspected, tensor-product smooths can be added at the cost of sample size and interpretability.
A GAM extends a GLM by allowing smooth terms in its predictor. It contains a linear GLM when those terms are linear, and its component curves expose the fitted additive associations. It is a good first model to try whenever a linear regression or a linear GLM leaves obvious non-linear residuals. Its Gaussian fitting mechanism, quadratic penalized least squares on an expanded basis, is closely related to ridge regression. The next chapter Ridge Regularization (L2 Regularization) develops that connection further. Lasso instead uses an absolute-value penalty and requires a different optimization problem.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!