liveBook · Manning

Mean squared error

As explained in Machine Learning System Design

The arithmetic mean of squared differences between predictions and actual values.

Mean squared error (MSE) is the arithmetic mean of the squared differences between predictions and actual values. It can serve as a regression loss, but its familiarity is not a reason to choose it by default. Ask whether penalizing large errors strongly matches the system’s goal. section 5.1

Two checks make the choice more concrete:

  • Does the loss reflect the outcome that matters? Selecting a loss deserves its own rationale, even when performance metrics have already been chosen. section 5.1
  • Are unusually large forecast errors plausible? Minimizing squared error leads to an unbiased point forecast, but MSE’s sensitivity to very high errors makes it unsuitable for intermittent-demand items and can also matter for other count data. section 5.3.1

A loss choice needs a reason

For a cryptocurrency exchange-volume predictor, a design document that lists evaluation metrics but skips the loss-function decision leaves an important question unanswered: what training objective best supports the forecast’s intended use? section 5.1

Compare MSE with alternatives such as mean absolute error rather than treating either as the automatic regression choice. A different loss can improve a model, but changing the loss alone will not solve every system problem. section 5.1

How Machine Learning System Design covers it

How deep it goes
Explains the forecast consequences of squared errors without deriving an optimization procedure.
Examples
Uses cryptocurrency exchange-volume prediction and intermittent-demand forecasting to test whether a loss choice is appropriate.
What you can do after
Evaluate/understand MSE as a regression-loss choice, including its sensitivity to very high forecast errors.
How it connects
Connects MSE to regression, mean absolute error, loss functions, and count-data forecasting.

Also explained in

Compare how 13 books explain mean squared error →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.