Skip to content

Main content

Metrics: Smape Single Pair Zero Policy Tool

Compute a single symmetric absolute percentage-error fraction using absolute magnitudes, with explicit zero/reject policy for an all-zero pair.

Loading tool…

Description

Use 2 × abs(forecast - actual) / (abs(actual) + abs(forecast)) for smapeFraction.

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.

Use 2 × abs(forecast - actual) / (abs(actual) + abs(forecast)) for smapeFraction.

When to use this tool

Use Metrics: Smape Single Pair Zero Policy when you need one explicit relative-error convention.

How to use the tool and how it works

  1. Enter actual, forecast, zeroPairPolicy. 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.

Use 2 × abs(forecast - actual) / (abs(actual) + abs(forecast)) for smapeFraction. At a double-zero pair, reject or return zero with defined false according to zeroPairPolicy.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.
zeroPairPolicyZero Pair PolicyRequired. Text; one of "zero", "reject". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.definedWhether the accompanying numeric result has an available denominator or required inputs.Calculated result member: boolean.
result.smapeFractionSmape FractionCalculated result member: number.
json
{
  "input": {
    "actual": 0,
    "forecast": 0,
    "zeroPairPolicy": "zero"
  },
  "output": {
    "result": {
      "defined": false,
      "smapeFraction": 0
    }
  }
}

Limitations and assumptions

  • The output is a fraction, not percent; zero-policy placeholders must be interpreted with defined and aggregation policies specified separately.
  • 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/smape-single-pair-zero-policy — tool.io

Similar or alternative tools