Skip to content

Main content

Pinball Quantile Derivative Residual Tool

Compute pinball quantile derivative residual from explicit bounded inputs.

Loading tool…

Description

Return the prediction gradient -quantile for positive residual and 1 - quantile for negative residual.

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.

Return the prediction gradient -quantile for positive residual and 1 - quantile for negative residual.

When to use this tool

Use Pinball Quantile Derivative Residual when you need an explicit quantile-loss term or convention.

How to use the tool and how it works

  1. Enter residual, quantile, zeroChoice. 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 gradient. Use the output convention below.

Return the prediction gradient -quantile for positive residual and 1 - quantile for negative residual. At zero use zeroChoice, constrained to [-quantile, 1 - quantile] for every input.1

Input fieldMeaning and unitsAccepted input
residualActual minus prediction; gradient is with respect to prediction.Required. Finite number.
quantileQuantile level as a fraction, not a percentage.Required. Finite number; minimum 0; maximum 1.
zeroChoiceChosen prediction subgradient at zero residual, in [-quantile, 1 - quantile].Required. Finite number.
Output fieldInterpretationReturned shape
gradientGradientRequired. Finite number.
json
{
  "input": {
    "residual": 2,
    "quantile": 0.75,
    "zeroChoice": 0
  },
  "output": {
    "gradient": -0.75
  }
}

Limitations and assumptions

  • Residual means actual minus prediction; the explicit zero-choice range is validated even away from zero residual.
  • 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-quantile-derivative-residual — tool.io

Similar or alternative tools