01 / 22

Overfitting &
Interpretability

Learn to recognize when models memorize noise instead of signal, and why the best model is one you can explain and trust.

Business Analytics

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

Feature (x) Output (y) True signal (good fit) Overfit model Data points

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.

High Interpretability
Linear regression, decision trees: you can trace each input to the output step by step.
Low Interpretability
Deep neural networks, ensemble models: powerful but behave like a "black box."

Why Both Matter in Business

Overfitting Risk
A model that overfits will make confident but wrong predictions on real customer data, costing revenue and trust.
Interpretability Risk
A model nobody can explain may violate regulations, hide bias, or be impossible to debug when it fails.
The Goal
Build models that generalize well to new data and can be clearly explained to decision-makers.

The Bias-Variance Tradeoff

Every model's total error can be decomposed as:

$$\text{Total Error} = \text{Bias}^2 + \text{Variance} + \text{Irreducible Noise}$$

High Bias
Model is too simple: it underfits and misses real patterns (e.g., a straight line through curved data).
High Variance
Model is too complex: it overfits and is hypersensitive to the specific training set.

Visualizing the Sweet Spot

Model Complexity Error Simple Complex Sweet Spot Bias² Variance Total Error

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

High Interpretability Low Interpretability Linear Regression Decision Tree Logistic Regression Random Forest Neural Network Complexity & Accuracy →

Detecting Overfitting: Train/Test Split

Full Dataset Training Set (70%) Test Set (30%) Model learns patterns Model is evaluated Big gap between scores = overfitting

How to Avoid Overfitting

1
Use a train/test split (or cross-validation) to evaluate your model on unseen data.
2
Simplify the model: fewer features, lower polynomial degree, or a simpler algorithm.
3
Regularization: Add a penalty for complexity. Methods like Lasso (\( L_1 \)) and Ridge (\( L_2 \)) shrink coefficients toward zero.
4
Collect more data: larger datasets make it harder for a model to memorize noise.
5
Early stopping: monitor validation error during training and stop when it starts rising.

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$$

Ridge (\( p = 2 \))
Shrinks coefficients smoothly toward zero. Keeps all features but reduces their impact.
Lasso (\( p = 1 \))
Can force coefficients exactly to zero, effectively removing features. Great for interpretability.

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 \).

Training \( R^2 = 0.97 \)
Test \( R^2 = 0.41 \)
Gap! Performance Comparison 0.0 1.0

Example 2: Applying Lasso

The analyst applies Lasso regularization (\( \lambda = 0.5 \)). Lasso zeroes out 42 of the 50 coefficients, keeping only 8 features.

Before (50 features)
Train \( R^2 = 0.97 \)
Test \( R^2 = 0.41 \)
After Lasso (8 features)
Train \( R^2 = 0.82 \)
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?"

Model A: Neural Net
"The model says deny." No clear explanation. Can't identify which factors drove the decision. Regulator flags a compliance risk.
Model B: Logistic Reg.
"Denied because debt-to-income ratio exceeded threshold." Clear, auditable, legally defensible.

Common Mistakes

✕ Ignoring the Test Set
Reporting only training accuracy makes a model look better than it actually is on new data.
✕ More Features = Better
Adding every available variable increases the risk of overfitting without improving true performance.
✕ Choosing Accuracy Alone
Picking the most accurate model while ignoring whether anyone can explain its predictions to stakeholders.

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?