askvity

How do you find the absolute average error?

Published in Error Measurement 3 mins read

The absolute average error (AAE) is calculated by averaging the absolute differences between actual and estimated values within a dataset. Here's a detailed breakdown:

Understanding Absolute Average Error

The AAE measures the average magnitude of errors in a set of predictions, giving you a sense of how far off your predictions are from the true values on average. It's a useful metric to evaluate the performance of predictive models.

Calculation Steps:

  1. Gather Your Data: You need a set of actual values (let's denote them as fi) and corresponding estimated or predicted values (i). In the context of the reference, fi refers to the actual flow size, and i is the estimated flow size.
  2. Calculate Absolute Errors: For each pair of actual and estimated values, calculate the absolute difference: |fi - f̂i|. This means you subtract the estimated value from the actual value and take the absolute value of the result. This ensures that both overestimations and underestimations contribute positively to the error measure.
  3. Sum the Absolute Errors: Add up all of the absolute errors calculated in the previous step. This is represented by the sum symbol (∑), indicating that you are adding all individual |fi - f̂i| values together across the dataset (Ψ, representing the query set).
  4. Divide by the Number of Values: Finally, divide the sum of the absolute errors by the number of pairs (or the size of the query set, denoted by |Ψ|) to get the AAE.

Formula:

The formula from the reference is:

AAE = 1 / |Ψ| ∑ ai ∈ Ψ | fi - f̂i |

Where:

  • fi is the actual value.
  • i is the estimated value.
  • | fi - f̂i | is the absolute error for each value.
  • Ψ is the query set.
  • |Ψ| is the size of the query set (the number of items in the query set)
  • ai ∈ Ψ represents the sum across all data in the query set

Example:

Let's say you have the following actual flow sizes and estimated flow sizes:

| Actual Flow (fi) | Estimated Flow (i) | Absolute Error (| fi - f̂i |) |
|-----------------------|--------------------------|-------------------------------------|
| 10 | 12 | | 10-12 | = 2 |
| 25 | 20 | | 25-20 | = 5 |
| 15 | 18 | | 15-18 | = 3 |
| 30 | 28 | | 30-28 | = 2 |

  1. Sum of Absolute Errors: 2 + 5 + 3 + 2 = 12
  2. Number of Values: 4
  3. AAE: 12 / 4 = 3

Therefore, in this example, the Absolute Average Error is 3.

Practical Insights:

  • Interpretation: An AAE of 3 indicates that, on average, your predicted flow sizes are off by 3 units from the actual flow sizes. The smaller the AAE, the more accurate your model is on average.
  • Robustness to Outliers: Unlike the mean squared error (MSE), the AAE is less sensitive to large errors, which is beneficial when your data contains outliers.
  • Use Cases: AAE can be used to evaluate various models, including those used in flow analysis, forecasting, and any scenario where you are comparing predictions to actual outcomes.
  • Context Matters: The 'acceptability' of your AAE value should always be considered within the context of your specific dataset and application. An error of 3 may be acceptable in some circumstances but unacceptable in others.

Related Articles