Mean Absolute Error (MAE)
- Measures the average magnitude of prediction errors using absolute differences (ignores sign).
- Commonly used in regression analysis to evaluate and compare model performance.
- Less sensitive to large errors or outliers than mean squared error and applicable to varied data distributions.
Definition
Section titled “Definition”Mean Absolute Error (MAE) is calculated by taking the average of the absolute differences between the predicted values and the actual values. Formally:
where y_i are the actual values and \hat{y}_i are the predicted values.
Explanation
Section titled “Explanation”MAE quantifies prediction accuracy in regression by averaging the absolute deviations between predictions and true values. Because it uses absolute values, MAE reports the mean magnitude of errors without canceling positive and negative errors. Compared with other error measures such as mean squared error, MAE is described as not being affected by large errors or outliers and is relatively insensitive to the distribution shape of the data, allowing use with skewed or non-normal distributions. MAE is straightforward to interpret and understand, and it can be used to compare different regression models and highlight areas for improvement.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”If a model predicts 3, 4, 5, and 6 for a set of actual values 2, 3, 4, and 5, the MAE is shown as:
This is reported as an average error of 1.5 for the model’s predictions.
Example 2 (stock prices)
Section titled “Example 2 (stock prices)”For a stock price prediction model that predicts 105, and predicts 95, the errors are |100-105| = 5 and |90-95| = 5. The MAE is:
This indicates an average error of 5 dollars per prediction.
Use cases
Section titled “Use cases”- Regression analysis for evaluating model accuracy.
- Comparing performance of different regression models and identifying areas for improvement.
- Applying to regression problems with varied data distributions (including skewed or non-normal).
Notes or pitfalls
Section titled “Notes or pitfalls”- Unlike mean squared error, MAE is described as not being affected by large errors or outliers.
- MAE is relatively insensitive to the distribution of the data and can be used with skewed or non-normal distributions.
Related terms
Section titled “Related terms”- Mean Squared Error (MSE)