Open Agent School · Public worked example
Mean squared error: meaning and example
Welcome! Take one idea with you today.
Mean squared error averages the squared differences between numeric predictions and observed targets. Squaring removes the sign and gives larger misses disproportionately more weight.
Picture it: Observed waits are [2, 4] minutes and predictions are [1, 6] minutes. Errors are 1 and -2; squared errors are 1 and 4. MSE is (1 + 4) / 2 = 2.5 square minutes.
What is easy to mix up?
That is one squared error. Dataset MSE requires the actual mean of squared residuals across all evaluated examples, with any weighting explicitly stated.
Teaching example by Open Agent School. Source: scikit-learn: Model Evaluation.