Skip to content

Main content

Metrics: Percentage Error Zero Actual Label Tool

Compute signed percentage forecast error with an explicit undefined flag and unused zero when actual is zero; does not silently claim zero error.

Loading tool…

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

  1. Enter actual, forecast. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
actualObserved value on the same scale and unit as its prediction.Required. Finite number.
forecastForecast value on the same scale and unit as actual.Required. Finite number.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.definedWhether the accompanying numeric result has an available denominator or required inputs.Calculated result member: boolean.
result.percentageErrorSigned forecast-minus-actual error divided by absolute actual, multiplied by 100; zero placeholder when undefined.Calculated result member: number.
result.zeroActualZero ActualCalculated result member: boolean.
json
{
  "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

  1. Calculation and input contract: metrics/percentage-error-zero-actual-label — tool.io

Similar or alternative tools