In statistics, the generalized additive model (GAM) is a statistical model developed by Trevor Hastie and Robert Tibshirani [1] for blending properties of generalized linear models with additive models.

The model specifies a distribution (such as a normal, or binomial distribution) and a link function g relating the expected value of the distribution to the m predictor variables, and attempts to fit functions fi(xi) to satisfy:

$g(\operatorname{E}(Y))=\beta_0 + f_1(x_1) + f_2(x_2)+ \cdots + f_m(x_m).\,\!$

The functions fi(xi) may be fit using parametric or non-parametric means, thus providing the potential for better fits to data than other methods. The method is thus very general—a typical GAM might use a scatterplot smoothing function such as a locally weighted mean for f1(x1), and then use a factor model for f2(x2). By allowing nonparametric fits, well designed GAMs allow good fits to the training data with relaxed assumptions on the actual relationship, perhaps at the expense of interpretability of results.

Overfitting can be a problem with GAMs.[citation needed] The number of smoothing parameters can be specified, and this number should be reasonably small, certainly well under the degrees of freedom offered by the data. Cross-validation can be used to detect and/or reduce overfitting problems with GAMs (or other statistical methods).[citation needed] Other models such as GLMs may be preferable to GAMs unless GAMs improve predictive ability substantially (in validation sets) for the application in question.