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
- Enter predictedFractions, suppliedPriorFractions. Follow any array-alignment requirements below. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| predictedFractions | Predicted Fractions | Required. Array of finite number; maximum items 256. |
| suppliedPriorFractions | Supplied Prior Fractions | Required. Array of finite number; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| residuals | Residuals | Required. Array of finite number; maximum items 256. |
| predictedTotal | Predicted Total | Required. Finite number. |
| priorTotal | Prior Total | Required. Finite number. |
{
"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
Similar or alternative tools
- Multiclass Score Mass Deficit
Return nonnegative score mass and target deficit.
- Classifier Probability Sum Roundoff Gap
Compare total class probability mass with one.