Model Evaluation & Metrics
Regression Metrics
5 min read
MSE (Mean Squared Error) = mean((y_true - y_pred)²)
- Penalizes large errors more
- Sensitive to outliers
MAE (Mean Absolute Error) = mean(|y_true - y_pred|)
- Robust to outliers
- Linear penalty
R² (R-squared) = 1 - (SS_res / SS_tot)
- Proportion of variance explained
- Range: (-∞, 1], 1 is perfect
Interview Q: "Predict house prices with outliers - MSE or MAE?" A: MAE (robust to outliers like mansions)
:::