🔬  Mean Squared Error (MSE)

Mean Squared Error (MSE)#

The average of squared differences between predictions and actuals.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

Mean squared error is the average of the squared differences between predictions and truth — the workhorse loss and metric for regression (also called L2 or quadratic loss):

\[\text{MSE} = \frac{1}{n}\sum_{i=1}^{n}\big(y_i - \hat{y}_i\big)^2.\]

Squaring makes every error positive and weights large errors far more than small ones.

How it behaves#

Because errors are squared, MSE is dominated by big misses and is sensitive to outliers — one large error can swamp many small ones. Its units are the square of the target’s, so it doesn’t read directly; minimizing MSE yields the mean (conditional expectation) as the optimal prediction.

Why it’s used#

It is smooth and differentiable, ideal for gradient descent (it is the loss regression networks minimize), and it is the maximum-likelihood loss under Gaussian noise. When outliers should count less, MAE is preferred.


Theme: Model Evaluation & Uncertainty  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Mean Squared Error (MSE) (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate