MSE (mean squared error)
Mean squared error (MSE) measures the average squared difference between a model's numerical predictions and the corresponding observed values. For each example, subtract the actual value from the prediction, square that error, and average the results; in notation, MSE = (1/n) Σᵢ (ŷᵢ − yᵢ)². Squaring makes larger errors count disproportionately more and prevents positive and negative errors from cancelling out. MSE is widely used as a loss function for regression models, where training aims to reduce it, and as an evaluation metric on held-out data. Because it is expressed in squared units and can be strongly affected by outliers, it is often useful to consider it alongside metrics such as root mean squared error or mean absolute error.