A2oz

What is the MAE score?

Published in Machine Learning 2 mins read

The MAE score, or Mean Absolute Error, is a measure of how accurate a model's predictions are. It calculates the average difference between the predicted values and the actual values, regardless of the direction of the difference.

Understanding MAE

  • MAE measures the average absolute error. It takes the absolute value of the difference between each prediction and its corresponding actual value. This means it doesn't care if the prediction is too high or too low; it only considers the magnitude of the error.
  • MAE is easy to interpret. It represents the average amount of error your model makes on its predictions.
  • MAE is sensitive to outliers. Outliers, or extreme values, can significantly impact the MAE score.

Calculating MAE

The formula for calculating MAE is:

MAE = (1/n) * Σ |y_i - ŷ_i|

Where:

  • n is the number of data points
  • y_i is the actual value
  • ŷ_i is the predicted value

Example

Imagine you are predicting the price of houses. Your model predicts a house will cost $300,000, but it actually sells for $320,000. The absolute error for this prediction is $20,000. You calculate the absolute error for all your predictions and average them to get the MAE.

When to Use MAE

MAE is a useful metric when:

  • You want a simple and interpretable measure of error.
  • You are not overly concerned with the direction of the error.
  • You want a metric that is robust to outliers.

Conclusion

The MAE score is a valuable tool for evaluating the accuracy of your models, particularly when you need a straightforward metric that is not heavily influenced by the direction of errors.

Related Articles