Generalized Additive Models › Disadvantages

Michael BrenndoerferOctober 25, 20262 min read
Machine Learning from ScratchAll chapters
Part 5 of 15Linear and Generalized Linear Models
Chapter 39Generalized Additive Models › Disadvantages
Reading section 3 of 10 · Disadvantages · 2 minSection 3 of 10 · 2 min

Section 3 of 10 · 2 min read

Generalized Additive Models › DisadvantagesSection view · Sections in this chapter3 / 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

Notes & comments

GAMs are not free. Their main limitation is that the additive structure itself is a strong assumption. If the true relationship involves an interaction between two predictors, say the effect of x1x_1 flips sign depending on x2x_2, an additive model cannot represent it. We can add explicit tensor-product smooths f12(x1,x2)f_{12}(x_1, x_2) to handle interactions, but each interaction term costs us both flexibility and sample size, and the resulting components are much harder to plot and interpret. In high dimensions the number of potential pairwise interactions explodes.

Second, GAMs depend on several tuning choices: the basis dimension and knot arrangement, the penalty order, and the smoothing parameter λ\lambda per component. Choosing those badly produces either an overfit curve that wiggles through noise or an over-smoothed curve that misses real structure. We can automate the choice with cross-validation or generalized cross-validation, but their estimates have sampling variability. Neither criterion guarantees that the selected model will generalize well; strong overlap between smooth terms can also complicate interpretation.

Third, extrapolation is dangerous in a way that is easy to forget. Out-of-domain behavior depends on the basis implementation: it may refuse prediction or impose an extrapolation rule. In particular, the Patsy and statsmodels B-spline transforms used here reject points beyond their boundary knots. A GAM should not be used to predict far outside the training support of any predictor.

A spline expansion also widens the design matrix relative to a linear model of the original predictors. Dense cross-products and coefficient solves then grow with the total basis dimension; specialized implementations can exploit sparsity or low-rank structure. We give the dense costs in Practical Implications.

Component plots show the fitted terms on the additive-predictor scale. They need care when predictors are dependent, because varying one predictor while holding the others fixed can leave the region supported by the data. Overlapping smooth-term spaces can also make individual components unstable.

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!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy