Skip to content

Main content

Metrics: Pinball Residual Term Tool

Compute one pinball/quantile-loss contribution for residual actual-minus-prediction at a supplied open-unit quantile.

Loading tool…

Description

For residual defined as actual minus prediction, use quantile × residual when nonnegative and (quantile - 1) × residual otherwise.

Pinball loss weights underprediction and overprediction differently for a target quantile. Its kink at zero residual requires a subgradient convention, and derivative signs depend on the variable.

For residual defined as actual minus prediction, use quantile × residual when nonnegative and (quantile - 1) × residual otherwise.

When to use this tool

Use Metrics: Pinball Residual Term when you need an explicit quantile-loss term or convention.

How to use the tool and how it works

  1. Enter residual, quantile. 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.

For residual defined as actual minus prediction, use quantile × residual when nonnegative and (quantile - 1) × residual otherwise. Quantile must be strictly between zero and one.1

Input fieldMeaning and unitsAccepted input
residualSigned residual using the convention in the calculation paragraph.Required. Finite number.
quantileQuantile level as a fraction, not a percentage.Required. Finite number.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.lossLossCalculated result member: number.
json
{
  "input": {
    "residual": -2,
    "quantile": 0.25
  },
  "output": {
    "result": {
      "loss": 1.5
    }
  }
}

Limitations and assumptions

  • This returns one pinball loss term, not a dataset mean or calibration assessment.
  • 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

Keep residual definitions consistent and assess quantile calibration and crossing across a complete forecast set.

References

  1. Calculation and input contract: metrics/pinball-residual-term — tool.io

Similar or alternative tools