Overfitting &
Interpretability
Learn to recognize when models memorize noise instead of signal, and why the best model is one you can explain and trust.
What Is Overfitting?
A model overfits when it learns the training data so well that it captures random noise and quirks rather than the true underlying pattern. It performs brilliantly on data it has already seen, but fails on new, unseen data.
Signal vs Noise
What Is Interpretability?
Interpretability is the degree to which a human can understand the reasoning behind a model's predictions. In business, stakeholders need to explain decisions to customers, regulators, and leadership.
Why Both Matter in Business
The Bias-Variance Tradeoff
Every model's total error can be decomposed as:
$$\text{Total Error} = \text{Bias}^2 + \text{Variance} + \text{Irreducible Noise}$$
Visualizing the Sweet Spot
Underfitting vs Overfitting
| Underfitting | Overfitting | |
|---|---|---|
| Complexity | Too simple | Too complex |
| Training Error | High | Very Low |
| Test Error | High | High |
| Bias | High | Low |
| Variance | Low | High |
| Real-World Risk | Misses trends | Chases noise |
The Interpretability Spectrum
Detecting Overfitting: Train/Test Split
How to Avoid Overfitting
Regularization Intuition
Regularization adds a penalty term to the loss function that discourages large coefficients:
$$\text{Loss}_{\text{reg}} = \text{Loss}_{\text{data}} + \lambda \sum_{j} |\beta_j|^p$$
Example 1: Predicting Sales
A retail analyst builds a model to predict weekly sales using 50 features (weather, promotions, holidays, social media mentions, etc.). Training \( R^2 = 0.97 \), but test \( R^2 = 0.41 \).
Example 2: Applying Lasso
The analyst applies Lasso regularization (\( \lambda = 0.5 \)). Lasso zeroes out 42 of the 50 coefficients, keeping only 8 features.
Test \( R^2 = 0.41 \)
Test \( R^2 = 0.78 \)
Example 3: Explaining a Loan Decision
A bank uses two models to approve loans. Model A (neural network) has 95% accuracy. Model B (logistic regression) has 90% accuracy. A regulator asks: "Why was this applicant denied?"
Common Mistakes
Summary Comparison
| Overfitting | Interpretability | |
|---|---|---|
| Core Question | Does the model generalize? | Can humans understand it? |
| Detection | Train/test gap | Can you explain a prediction? |
| Fix | Regularization, simpler model | Use simpler algorithms or explainability tools |
| Business Impact | Wrong predictions cost money | Unexplainable models cost trust |
| Key Metric | Test accuracy vs train accuracy | Can a non-technical person follow the logic? |
Question 1 of 5
A model achieves 99% accuracy on training data but only 62% on test data. What is the most likely problem?
Question 2 of 5
Which regularization technique can force some feature coefficients exactly to zero, effectively performing feature selection?
Question 3 of 5
A bank must explain loan denial reasons to applicants. Which model is most appropriate?
Question 4 of 5
In the bias-variance tradeoff, increasing model complexity generally causes:
Question 5 of 5
An analyst's model uses 50 features and overfits. After applying Lasso, only 8 features remain and test performance improves. What happened?