Mean squared error (MSE) is a regression loss that averages the squared differences between predictions and ground-truth response values. For predictions f(xᵢ; θ) and targets yᵢ over n examples, it is computed by subtracting each prediction from its target, squaring the residual, and averaging the results. Squaring removes negative signs and penalizes large deviations more strongly. section 1.1 section 6.1
MSE applies when the target is continuous rather than a discrete class label. It provides a numerical objective for judging a regressor, including linear regression, and supports the broader goal of minimizing loss while retaining accuracy on unseen examples. section 1.1 section 6.1
Reading the calculation:
- Compute the residual between each ground-truth value and its prediction. section 1.1
- Square every residual so positive and negative errors contribute equally while larger errors receive greater penalty. section 1.1
- Average the squared residuals across the data points to obtain the MSE. section 1.1












