What diagnostic evidence justifies adding interaction or polynomial terms to your model?

Quick Overview

Explain what diagnostic evidence justifies adding interaction or polynomial terms to a regression model. Tests reading residual and partial-residual plots, learning curves, flexible-model benchmarks, nested-model tests and AIC, and confirming gains with cross-validation.

What diagnostic evidence justifies adding interaction or polynomial terms to your model?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What diagnostic evidence justifies adding interaction or polynomial terms to your model? You have fit a linear or generalized linear model. Explain what you would look at before adding interaction or polynomial terms, and how you would confirm that the new terms actually help. ```hint Plot what the model gets wrong Look at the residuals against each predictor, then split those plots by a second feature. ``` ```hint Training fit always improves Adding a term can never make the training fit worse, so ask which comparison would show a gain on unseen data. ``` ### What a Strong Answer Covers - The underfitting signature in training error, validation error and learning curves - Residual and partial-residual patterns that point to curvature or to an interaction, and how the two look different - Using a flexible benchmark model and its explanation tools to locate missing structure - Formal and held-out confirmation, and the variance cost of every added term ### Follow-up Questions - Why should a model with an $x_1 x_2$ interaction usually keep the $x_1$ and $x_2$ main effects? - When would you use splines or a GAM in place of polynomial terms? - How do you guard against false discoveries when you screen many candidate interactions? - Why does centering a feature before squaring it help?

Overview: Explain what diagnostic evidence justifies adding interaction or polynomial terms to a regression model. Tests reading residual and partial-residual plots, learning curves, flexible-model benchmarks, nested-model tests and AIC, and confirming gains with cross-validation.

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

What diagnostic evidence justifies adding interaction or polynomial terms to your model?

You have fit a linear or generalized linear model. Explain what you would look at before adding interaction or polynomial terms, and how you would confirm that the new terms actually help.

What a Strong Answer Covers Guidance

  • The underfitting signature in training error, validation error and learning curves
  • Residual and partial-residual patterns that point to curvature or to an interaction, and how the two look different
  • Using a flexible benchmark model and its explanation tools to locate missing structure
  • Formal and held-out confirmation, and the variance cost of every added term

Follow-up Questions Guidance

  • Why should a model with an x1x2x_1 x_2 interaction usually keep the x1x_1 and x2x_2 main effects?
  • When would you use splines or a GAM in place of polynomial terms?
  • How do you guard against false discoveries when you screen many candidate interactions?
  • Why does centering a feature before squaring it help?