Overfitting occurs when a model learns noise or peculiarities in training data so closely that it predicts new data poorly. Flexible function families can fit the past extremely well while failing to distinguish signal from noise. The central question is whether a model that predicts the past will also predict the future. section 4.1
Studying from solved exams
Memorizing every solved exam can produce excellent performance on familiar questions without demonstrating understanding. Setting some exams aside, studying the remainder, and testing on unseen exams estimates performance on the final exam. Train-test splitting applies the same idea: fit the model on train data and evaluate predictions against known outcomes in test data. section 4.1
Check for overfitting by separating ordinary model selection from prediction on unseen observations:
- Use cross-validation or train-test splitting to compare model configurations on data not used for fitting. section 4.1
- Do not assume cross-validation alone prevents overfitting when predictions are later made on the same dataset used for training. section 4.2.5
- Use cross-fitting when a causal procedure requires predictions for the observations used in the overall analysis: train on one fold and predict on another. section 4.2.5 section 4.6
- Select causal adjustment variables using domain knowledge rather than choosing every variable that improves predictive accuracy. section 5.3.2
Comparing models with varying complexity in data fitting. Although the model on the left fits the data more closely (it passes through all points), the model on the right can get the full picture better.
Compare a highly flexible curve that passes through every observed point with a simpler model that captures the broader pattern. section 4.2.5
In supervised learning, the target is the conditional expectation E[Y|X], not the individual observed value yi. Training on the same observations encourages predictions toward those observed values, especially with complex models. In causal inference, this distinction matters for S-learners, T-learners, propensity scores, and adjustment formulas. section 4.2.5 section 4.6























