liveBook · Manning

Mean absolute error

As explained in Starting Data Analytics with Generative AI and Python

Mean absolute error is the average of the absolute differences between predicted and actual values.

Mean absolute error (MAE) summarizes how far predictions are from actual values on average. It takes each prediction error without regard to direction, measures its absolute size, and averages those sizes. Smaller MAE indicates better predictive performance, but it does not make a model automatically useful: predictions can still vary widely around the regression line. section 3.4.2

Comparing shipping-cost models

For freight-value predictions, the product-weight model reported MAE=6.89, while the product-volume model reported MAE=7.41. The weight model therefore had the smaller average absolute error in these results. Interpret the values in the dataset’s freight-value units and compare them with MSE, RMSE, and R-squared rather than relying on MAE alone. section 4.6

MAE supports practical questions such as whether a model is accurate enough for shipping estimates. Validate the model with additional data and analysis, because its assumptions and the many other factors affecting real shipping costs can limit reliability. section 4.6

How Starting Data Analytics with Generative AI and Python covers it

How deep it goes
Defines average absolute prediction error and compares model results, but stops short of deriving the metric mathematically.
Examples
Compares product-weight and product-volume models predicting freight value, reporting MAE values of 6.89 and 7.41.
What it assumes
Assumes predicted and actual values from a regression workflow, while explaining the metric’s practical meaning directly.
What you can do after
Apply it via scikit-learn to compare the average prediction errors of regression models.
How it connects
Connects MAE with regression models, MSE, RMSE, R-squared, residual analysis, and diagnostic plots.

Also explained in

Compare how 10 books explain mean absolute error →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Starting Data Analytics with Generative AI and Python. The section links point to the parts of the book it draws on.