Linear Regression from Scratch
Measuring model error
9 min · beginner
To improve a model, we need to know how wrong it is. A residual is the distance between a prediction and the real value.
If the actual value is 10 and the prediction is 8, the error has a size of 2. Mean squared error squares each residual so larger mistakes matter more.
Prediction → error → parameter update → new prediction