Description
Return the binary balanced positive/negative weight ratio.
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 the binary balanced positive/negative weight ratio.
When to use this tool
Use Classification: Fraction To Class Weight Ratio when checking the stated probability-mass, prior-odds or weighting convention.
How to use the tool and how it works
- Enter positiveFraction. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Return the binary balanced positive/negative weight ratio. Require positiveFraction strictly in (0,1); ratio = (1-positiveFraction)/positiveFraction.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| positiveFraction | Positive Fraction | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned calculated value or nested object under the stated output convention. | Required. Object. |
| result.positiveToNegativeBalancedWeightRatio | Positive To Negative Balanced Weight Ratio | Calculated result member: number. |
{
"input": {
"positiveFraction": 0.2
},
"output": {
"result": {
"positiveToNegativeBalancedWeightRatio": 4
}
}
} Limitations and assumptions
- This is an inverse-prevalence weighting convention, not a recommended cost ratio or a calibrated class prior.
- 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
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 Weight Rebalancing Multiplier
Return one class's balanced weighting multiplier.
- Binary Class Weight Effective Prevalence
Return effective positive prevalence after class weighting.