Skip to content
Lambdian

Mean squared error (MSE)

The average of the squared differences between predictions and true values.

MSE=1n∑i=1n(yi−y^i)2\text{MSE} = \frac{1}{n}\sum_{i=1}^n (y_i - \hat y_i)^2

Squaring makes all errors positive and punishes large errors much more than small ones. MSE is the standard loss for regression; its square root, RMSE, is in the same units as the target and easier to report. Because big errors dominate, MSE is sensitive to outliers; MAE (mean absolute error) is the robust alternative.

See it in action