When a model predicts a house price, its error is the difference between the predicted and actual price. Root mean squared error, or RMSE, summarizes these differences in one number. section 3.23
To calculate RMSE, square every prediction error, find the average, and take the square root. Squaring makes large errors matter more; taking the root returns the result to the original units. An RMSE of $10,000 suggests the model is roughly $10,000 away per prediction. section 3.23
Use RMSE to compare prediction quality:
- Average errors before comparing datasets of different sizes; a total error grows simply because a dataset contains more points. section 3.23
- Interpret the result in the target's units, such as dollars for house prices rather than dollars squared. section 3.23
- Treat a large RMSE as a clue rather than a final verdict: outliers or missing predictive features may explain it. section 3.27
Evaluating housing models
A linear regression model trained on Hyderabad housing data reports an RMSE close to 4,000,000. A polynomial model without regularization has testing RMSE 1862.044, while L1 and L2 regularization reduce it to 0.153 and 0.104 in the demonstrated dataset. The lower value indicates less typical prediction error within the evaluated data. section 3.27 section 4.14
|
|
Size (s)
|
Prize (p)
|
|
House 1
|
100
|
200
|
|
House 2
|
200
|
475
|
|
House 3
|
200
|
400
|
|
House 4
|
250
|
520
|
|
House 5
|
325
|
735
|
Work through the supplied house-size and price table by calculating predictions, mean absolute error, and RMSE. section 3.38









