When a model predicts house prices, each prediction may miss the observed price by a different amount. Mean absolute error (MAE) summarizes those misses as one average distance from the predictions to the observed values. section 3.23
Calculate the absolute error for every prediction, add those errors, and divide by the number of predictions: MAE = (|e₁| + |e₂| + ⋯ + |eₙ|) / n. Averaging makes errors more comparable across datasets with different numbers of points. section 3.23
Practice with house prices
Use the house-size and price data to calculate the model’s predictions, then calculate its mean absolute error. Compare the result with the root mean square error as a second view of prediction error. section 3.38
|
|
Size (s)
|
Prize (p)
|
|
House 1
|
100
|
200
|
|
House 2
|
200
|
475
|
|
House 3
|
200
|
400
|
|
House 4
|
250
|
520
|
|
House 5
|
325
|
735
|
Use the house-size and price table as the dataset for the error-calculation exercise. section 3.38














