Skip to content

Main content

Metrics: Quantile Crossing Two Output Flag Tool

Detect crossing between two explicitly ordered quantile forecasts; no rearrangement, calibration test or full quantile curve.

Loading tool…

Description

Mark crossed only when lowerPrediction exceeds upperPrediction and return the positive difference, otherwise zero magnitude.

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.

Mark crossed only when lowerPrediction exceeds upperPrediction and return the positive difference, otherwise zero magnitude.

When to use this tool

Use Metrics: Quantile Crossing Two Output Flag when you need an explicit quantile-loss term or convention.

How to use the tool and how it works

  1. Enter lowerQuantile, lowerPrediction, upperQuantile, upperPrediction. 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.

Require 0 < lowerQuantile < upperQuantile < 1. Mark crossed only when lowerPrediction exceeds upperPrediction and return the positive difference, otherwise zero magnitude.1

Input fieldMeaning and unitsAccepted input
lowerQuantileLower QuantileRequired. Finite number.
lowerPredictionLower PredictionRequired. Finite number.
upperQuantileUpper QuantileRequired. Finite number.
upperPredictionUpper PredictionRequired. Finite number.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.crossedCrossedCalculated result member: boolean.
result.crossingMagnitudeCrossing MagnitudeCalculated result member: number.
json
{
  "input": {
    "lowerQuantile": 0.1,
    "lowerPrediction": 3,
    "upperQuantile": 0.9,
    "upperPrediction": 2
  },
  "output": {
    "result": {
      "crossed": true,
      "crossingMagnitude": 1
    }
  }
}

Limitations and assumptions

  • Quantile ordering is checked but predictions are not repaired; equality is not classified as crossing.
  • 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/quantile-crossing-two-output-flag — tool.io

Similar or alternative tools