Description
Use residual = actual minus forecast.
Signed errors preserve direction while absolute or squared errors emphasize magnitude. Their gradients and small-residual approximations represent specific mathematical terms rather than complete performance evaluations.
Use residual = actual minus forecast.
When to use this tool
Use Metrics: Forecast Error Underprediction Weight when you need an explicit error, gradient, or local loss component.
How to use the tool and how it works
- Enter residual, underpredictionWeight, overpredictionWeight. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Use residual = actual minus forecast. Multiply its magnitude by underpredictionWeight for nonnegative residuals or overpredictionWeight otherwise; mark underprediction only for strictly positive residual.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| residual | Actual minus forecast; positive means underprediction. | Required. Finite number. |
| underpredictionWeight | Underprediction Weight | Required. Finite number. |
| overpredictionWeight | Overprediction Weight | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.weightedAbsoluteError | Weighted Absolute Error | Calculated result member: number. |
| result.underprediction | Underprediction | Calculated result member: boolean. |
{
"input": {
"residual": 2,
"underpredictionWeight": 3,
"overpredictionWeight": 1
},
"output": {
"result": {
"weightedAbsoluteError": 6,
"underprediction": true
}
}
} Limitations and assumptions
- Weights are supplied nonnegative costs; a zero residual has zero loss and no strict underprediction flag.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Assess a full error distribution and keep the sign and aggregation conventions consistent across models.
References
Similar or alternative tools
- Metrics: Pinball Residual Term
For residual defined as actual minus prediction, use quantile × residual when nonnegative and (quantile - 1) × residual otherwise.
- Metrics: Forecast Error Sign Convention
Subtract actual from forecast for forecast-minus-actual, or reverse the subtraction for actual-minus-forecast.