Data Science & ML
Basic

Mean Squared Error (MSE)

Average of squared differences between predicted and actual values.

Formula

MSE=1ni=1n(yiy^i)2MSE = \frac{1}{n}\sum_{i=1}^{n}(y_i - \hat{y}_i)^2

Variables

y_iActual value
\hat{y}_iPredicted value
nNumber of samples

Example

For errors 2, -1, 3: MSE = (4+1+9)/3 = 4.67

Did You Know?

MSE penalizes large errors heavily because the differences are squared.