Description
Calculate an included observation's weight and squared-weight term.
Data workflows require explicit training scope, feature/label availability, missingness codes, group assignments and evaluation direction. Supplied training statistics are not proof that preprocessing avoided leakage. A local target-encoding term or retransformed prediction depends on assumptions that must be checked in the complete model and validation design.
Calculate an included observation's weight and squared-weight term.
When to use this tool
Use Sample Weight Single Effective Mass when you already have weight, inclusionFlag and need to calculate an included observation's weight and squared-weight term.
How to use the tool and how it works
- Enter weight, inclusionFlag. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read effectiveWeight, squaredWeight. Use the output convention below.
Require weight>=0; return weight and weight² when inclusionFlag=true, otherwise two zeros.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| weight | Weight | Required. Finite number; minimum 0. |
| inclusionFlag | Inclusion Flag | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| effectiveWeight | Effective Weight | Required. Finite number. |
| squaredWeight | Included weight² or zero when excluded; not aggregate effective sample size. | Required. Finite number. |
{
"input": {
"weight": 2.5,
"inclusionFlag": true
},
"output": {
"effectiveWeight": 2.5,
"squaredWeight": 6.25
}
} Limitations and assumptions
- An excluded observation avoids squaring even an extreme weight. No sampling probability, aggregate effective sample size, uncertainty or appropriate weighting is inferred.
- 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
Review the full data lineage, preprocessing fit, split design and evaluation procedure for model conclusions. Estimate required statistics only within the intended training folds and verify actual availability; local supplied-value transformations cannot establish those properties by themselves.
References
Similar or alternative tools
- Heteroskedasticity Robust Meat Row
Calculate one scalar squared weighted-score contribution for a robust-covariance calculation.
- Dataset Stratum Sampling Fraction
Calculate a supplied stratum's sampling fraction and remainder.