Why would you add polynomial features to a linear model?

Quick Overview

Asks why adding squared, cubic and interaction terms lets linear or logistic regression fit curved relationships. Tests whether you understand linearity in the coefficients, how fast the feature count grows with degree, overfitting and extrapolation risk, and how scaling and regularization keep the expansion under control.

Why would you add polynomial features to a linear model?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Why would you add polynomial features to a linear model? Think of terms such as $x^2$, $x^3$ or $x_1 x_2$ added as extra inputs to linear or logistic regression. ```hint What is still linear Once $x^2$ is just another column, ask what the model is linear in, and what that means for how it is trained and how many columns you end up with. ``` ### What a Strong Answer Covers - What squared and interaction terms let the model represent that the raw inputs cannot. - Why the model is still linear in its coefficients and what that keeps for training and interpretation. - How the number of terms grows with degree, and the overfitting and extrapolation risk that comes with it. - Practical safeguards: scaling, regularization and choosing the degree. - Alternatives when polynomial terms are a poor fit. ### Follow-up Questions - How many columns does a degree-3 expansion of 20 inputs produce, and how would you keep that manageable? - Why does feature scaling matter more after a polynomial expansion? - How do you interpret the coefficient on $x_1 x_2$, and how does it change the meaning of the coefficient on $x_1$? - When would you pick splines or a tree model over polynomial features?

Overview: Asks why adding squared, cubic and interaction terms lets linear or logistic regression fit curved relationships. Tests whether you understand linearity in the coefficients, how fast the feature count grows with degree, overfitting and extrapolation risk, and how scaling and regularization keep the expansion under control.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Why would you add polynomial features to a linear model? Think of terms such as x2x^2, x3x^3 or x1x2x_1 x_2 added as extra inputs to linear or logistic regression.

What a Strong Answer Covers Guidance

  • What squared and interaction terms let the model represent that the raw inputs cannot.
  • Why the model is still linear in its coefficients and what that keeps for training and interpretation.
  • How the number of terms grows with degree, and the overfitting and extrapolation risk that comes with it.
  • Practical safeguards: scaling, regularization and choosing the degree.
  • Alternatives when polynomial terms are a poor fit.

Follow-up Questions Guidance

  • How many columns does a degree-3 expansion of 20 inputs produce, and how would you keep that manageable?
  • Why does feature scaling matter more after a polynomial expansion?
  • How do you interpret the coefficient on x1x2x_1 x_2 , and how does it change the meaning of the coefficient on x1x_1 ?
  • When would you pick splines or a tree model over polynomial features?