Skip to content

Main content

Binary Class Weight Effective Prevalence Tool

Compute binary class weight effective prevalence from explicit bounded inputs.

Loading tool…

Description

Return effective positive prevalence after class weighting.

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.

Return effective positive prevalence after class weighting.

When to use this tool

Use Binary Class Weight Effective Prevalence when checking the stated probability-mass, prior-odds or weighting convention.

How to use the tool and how it works

  1. Enter positives, negatives, positiveWeight, negativeWeight. 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 weightedPrior. Use the output convention below.

Return effective positive prevalence after class weighting. Require nonnegative whole counts/weights and positive total weighted mass; weightedPrior = positives*positiveWeight/(positive mass+negative mass).1

Input fieldMeaning and unitsAccepted input
positivesPositivesRequired. Safe integer; minimum 0.
negativesNegativesRequired. Safe integer; minimum 0.
positiveWeightPositive WeightRequired. Finite number.
negativeWeightNegative WeightRequired. Finite number.
Output fieldInterpretationReturned shape
weightedPriorWeighted PriorRequired. Finite number.
json
{
  "input": {
    "positives": 2,
    "negatives": 6,
    "positiveWeight": 3,
    "negativeWeight": 1
  },
  "output": {
    "weightedPrior": 0.5
  }
}

Limitations and assumptions

  • This is a weighting-induced ratio, not a verified population prior or correction of calibrated predictions.
  • 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/binary-class-weight-effective-prevalence — tool.io

Similar or alternative tools