Absolute error
Absolute error is an error measure based on the nonnegative absolute difference between an observed value and its prediction, optionally aggregated across observations.
Grokking Machine Learning
A regression error metric equal to the sum of the absolute differences between observed and predicted target values.
- How it is used
- Measures how closely a linear-regression line fits dataset points by summing their vertical distances.
- How deep it goes
- Explains how absolute values handle positive or negative label differences before summing distances.
- Examples
- Compares bad and good fitted lines by their larger and smaller absolute errors.
- What you can do after
- Evaluate a linear-regression fit by adding the absolute differences between observed and predicted labels.
Read how Grokking Machine Learning explains absolute error →
Grokking Machine Learning, Second Edition
Absolute error is an error metric equal to the sum of the absolute vertical distances between a fitted line and the observed data points.
- How it is used
- Measures and compares the fit of linear regression models by summing their prediction distances.
- How deep it goes
- Defines absolute distances, explains model selection, and stops short of making mean absolute error the primary practical measure.
- Examples
- Uses competing fitted lines, vertical distance diagrams, and regression models trained on housing prices.
- What you can do after
- Evaluate and choose a regression line by comparing summed absolute prediction distances.
Read how Grokking Machine Learning, Second Edition explains absolute error →
Ensemble Methods for Machine Learning
Absolute error measures prediction error as the absolute difference between a target and its prediction.
- How it is used
- Measures continuous-valued regression error while limiting the influence of outliers.
- How deep it goes
- Defines the formula, likelihood interpretation, outlier behavior, and differentiability limit for Newton boosting.
- Examples
- Visualizes absolute error alongside squared error and other loss functions in Figure 7.10.
- What you can do after
- Evaluate regression loss choices by comparing outlier sensitivity, likelihood assumptions, and differentiability.
Read how Ensemble Methods for Machine Learning explains absolute error →
Also covered in
What to know first
- linear regressionLinear regression is a statistical method that models a numeric response as a linear function of one or more predictor variables with fitted parameters.
Related concepts
- objective functionkind of · An objective function is a mathematical function that assigns values to candidate solutions or parameter settings, which an optimization procedure seeks to minimize or maximize.
- squared errorcontrasts with · Squared error is a measure of discrepancy equal to the square of the difference between a predicted or fitted value and its corresponding observed or target value.
- distancehas part · A distance function assigns a numerical measure of separation or dissimilarity to pairs of points or objects in a defined space.
- mean absolute errorproduces · Mean absolute error is the arithmetic mean of the absolute differences between corresponding predicted and observed numerical values.
- cross entropy lossalternative to · Cross-entropy loss measures the expected negative log probability that a predicted distribution assigns to outcomes drawn from a target distribution.
Questions about absolute error
What is absolute error?
Absolute error is an error measure based on the nonnegative absolute difference between an observed value and its prediction, optionally aggregated across observations.
Which Manning books explain absolute error?
Grokking Machine Learning, Grokking Machine Learning, Second Edition and Ensemble Methods for Machine Learning.
What should I know before learning absolute error?
Manning books that teach absolute error usually introduce linear regression first.
What is the difference between absolute error and squared error?
Absolute error is an error measure based on the nonnegative absolute difference between an observed value and its prediction, optionally aggregated across observations. Squared error is a measure of discrepancy equal to the square of the difference between a predicted or fitted value and its corresponding observed or target value.
What is absolute error a kind of?
Absolute error is a kind of objective function. An objective function is a mathematical function that assigns values to candidate solutions or parameter settings, which an optimization procedure seeks to minimize or maximize.
What are the parts of absolute error?
Absolute error includes distance.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


