Skip to content

Main content

Predicted Prior Mass Residual Tool

Compare supplied candidate class masses without normalizing them or asserting calibration.

Loading tool…

Description

Compare predicted and supplied prior class fractions.

Class prevalence, probability mass and training weights describe different distributions. Removing a class, changing class weights or correcting prior odds changes a particular numerical basis; none of those operations by itself estimates population shift or establishes calibrated predictions.

Compare predicted and supplied prior class fractions.

When to use this tool

Use Predicted Prior Mass Residual when checking the stated probability-mass, prior-odds or weighting convention.

How to use the tool and how it works

  1. Enter predictedFractions, suppliedPriorFractions. Follow any array-alignment requirements below. 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 residuals, predictedTotal, priorTotal. Use the output convention below.

Compare predicted and supplied prior class fractions. Require aligned arrays with each value in [0,1]; residuals = predicted-prior, return both sums independently.1

Input fieldMeaning and unitsAccepted input
predictedFractionsPredicted FractionsRequired. Array of finite number; maximum items 256.
suppliedPriorFractionsSupplied Prior FractionsRequired. Array of finite number; maximum items 256.
Output fieldInterpretationReturned shape
residualsResidualsRequired. Array of finite number; maximum items 256.
predictedTotalPredicted TotalRequired. Finite number.
priorTotalPrior TotalRequired. Finite number.
json
{
  "input": {
    "predictedFractions": [
      0.25,
      0.75
    ],
    "suppliedPriorFractions": [
      0.5,
      0.5
    ]
  },
  "output": {
    "residuals": [
      -0.25,
      0.25
    ],
    "predictedTotal": 1,
    "priorTotal": 1
  }
}

Limitations and assumptions

  • Neither vector is required to sum to one; no prior shift, class identity or probability calibration is established.
  • 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

Check the complete class distribution and its sampling basis; use a justified shift model or fitted calibration method when adapting predictions to a new population.

References

  1. Calculation and input contract: classification/predicted-prior-mass-residual — tool.io

Similar or alternative tools