Description
Compare total class probability mass with one.
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 total class probability mass with one.
When to use this tool
Use Classifier Probability Sum Roundoff Gap when checking the stated probability-mass, prior-odds or weighting convention.
How to use the tool and how it works
- Enter masses, tolerance. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gap, acceptable. Inspect acceptable before interpreting the associated values.
Compare total class probability mass with one. Require masses in [0,1] and tolerance >= 0; gap = 1-sum(masses), acceptable means abs(gap) <= tolerance.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| masses | Masses | Required. Array of finite number; maximum items 256. |
| tolerance | Nonnegative caller-selected comparison tolerance, in matching units. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gap | Signed difference under the stated comparison convention, with matching units. | Required. Finite number. |
| acceptable | Acceptable | Required. Boolean. |
{
"input": {
"masses": [
0.25,
0.5
],
"tolerance": 0.01
},
"output": {
"gap": 0.25,
"acceptable": false
}
} Limitations and assumptions
- Empty input can pass a sufficiently large tolerance; this is local mass bookkeeping, not meaningful class coverage or calibration.
- 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
- Class Probability Renormalization Abstain Term
Renormalize retained classes after removing an abstention component.
- Multiclass Score Mass Deficit
Return nonnegative score mass and target deficit.