Description
When actual is nonzero, return 100 × (forecast - actual) / abs(actual).
Percentage-style errors depend on their denominator, scaling factor, and zero policy. A fractional symmetric error and a signed percent error have different ranges and interpretations.
When actual is nonzero, return 100 × (forecast - actual) / abs(actual).
When to use this tool
Use Metrics: Percentage Error Zero Actual Label when you need one explicit relative-error convention.
How to use the tool and how it works
- Enter actual, forecast. 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.
When actual is nonzero, return 100 × (forecast - actual) / abs(actual). At zero return percentageError zero, defined false, and zeroActual true.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| actual | Observed value on the same scale and unit as its prediction. | Required. Finite number. |
| forecast | Forecast value on the same scale and unit as actual. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.defined | Whether the accompanying numeric result has an available denominator or required inputs. | Calculated result member: boolean. |
| result.percentageError | Signed forecast-minus-actual error divided by absolute actual, multiplied by 100; zero placeholder when undefined. | Calculated result member: number. |
| result.zeroActual | Zero Actual | Calculated result member: boolean. |
{
"input": {
"actual": 0,
"forecast": 2
},
"output": {
"result": {
"defined": false,
"percentageError": 0,
"zeroActual": true
}
}
} Limitations and assumptions
- The signed output is percent, not absolute percentage error; the zero placeholder must not silently enter aggregates.
- 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
Report the denominator and zero policy with aggregates, and compare absolute errors when relative denominators are unstable.
References
Similar or alternative tools
- Metrics: Smape Single Pair Zero Policy
Use 2 × abs(forecast - actual) / (abs(actual) + abs(forecast)) for smapeFraction.
- Symmetric Mape Denominator Convention
Divide factor × abs(predicted - actual) by abs(actual) + abs(predicted).