Interactions and polynomials

An interaction is a new variable built from several: a product, ratio, or difference. Polynomial features (square, cross products) let a linear model represent nonlinear relationships, but they quickly increase the number of columns and the risk of overfitting.

Example

PolynomialFeatures(degree=2, include_bias=False)

Related concepts

The whole glossary