Skip to interview prep
Apexed

14. What is overfitting and how do you prevent it?

MediumMachine learning basics

Technical

Type or dictate your answer. Your draft is saved on this device.

Show model answer

An overfit model learns noise in the training data, scoring well on training data but poorly on new data.

Prevent it with more data, simpler models, regularisation (L1/L2), cross-validation, early stopping, and keeping a held-out test set that is never used for tuning.

What is overfitting and how do you prevent it — Data & analytics interview question — Apexed