What is Mean squared error?
In Turkish: Ortalama kare hata (MSE) · Topic: Math foundations
The average of the squared differences between a model's predictions and the actual values. It is a common way to summarize error in a single number for models that predict numerical values.
How does it work?
For each example, the difference between the prediction and the true value is taken, multiplied by itself, and then averaged over all examples. Squaring does two things: positive and negative errors cannot cancel each other out, and large errors are punished disproportionately more than small ones. For instance, a miss of two units costs four, while a miss of four units costs sixteen. During training this value is minimized, and because it is smooth and differentiable, it works well with gradient descent.
Why does it matter?
MSE is one of the most basic loss functions and evaluation measures for regression problems, common in tasks such as predicting house prices, demand or temperature. Its sensitivity to extreme values cuts both ways: it catches large errors, but a few unusual data points can distort the result. Its unit is the square of the data's unit, so its square root (RMSE) is often preferred for interpretation.
Example
A model that predicts rental prices for apartments uses MSE to measure how far, on average, it strays from actual rents; one huge error on a single apartment raises the value noticeably.
FAQ
What is the difference between MSE and mean absolute error (MAE)?
MAE averages the absolute values of the errors and counts every error in proportion. MSE squares the errors, so it punishes large ones more heavily and is more sensitive to outliers.
Does a low MSE always mean a good model?
No. A model can have a low MSE on its training data and still make large errors on new data, which is called overfitting. That is why evaluation uses a separate test set.