Skip to content

Main content

Sample Weight Unknown Support Flag Tool

Partition supplied sample weights by independently supplied support-known flags.

Loading tool…

Description

Separate known and unknown sample-weight totals.

Weights, hash collisions and regression diagnostics have estimator-specific meanings. A local count, signed contribution or residual scaling can be calculated from supplied inputs without establishing sampling validity or model quality.

Separate known and unknown sample-weight totals.

When to use this tool

Use Sample Weight Unknown Support Flag when checking the stated weight, hash or diagnostic contribution.

How to use the tool and how it works

  1. Enter weights, known. Keep parallel arrays aligned. 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 knownWeight, unknownWeight, allWeightKnown. Inspect allWeightKnown before interpreting the associated values.

Separate known and unknown sample-weight totals. Require aligned nonnegative weights/known flags; sum each group and return allWeightKnown from every flag.1

Input fieldMeaning and unitsAccepted input
weightsWeightsRequired. Array of finite number; maximum items 256.
knownWhether the supplied value has the stated known observation or vocabulary status.Required. Array of boolean; maximum items 256.
Output fieldInterpretationReturned shape
knownWeightKnown WeightRequired. Finite number.
unknownWeightUnknown WeightRequired. Finite number.
allWeightKnownEvery supplied known flag is true, including zero-weight entries; true for empty arrays.Required. Boolean.
json
{
  "input": {
    "weights": [
      1,
      2,
      3
    ],
    "known": [
      true,
      false,
      true
    ]
  },
  "output": {
    "knownWeight": 4,
    "unknownWeight": 2,
    "allWeightKnown": false
  }
}

Limitations and assumptions

  • Empty input is vacuously all known; an unknown zero-weight record still makes allWeightKnown false.
  • 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

Use a complete estimator or feature pipeline and justified assumptions to assess statistical impact, uncertainty and model behavior.

References

  1. Calculation and input contract: data-science/sample-weight-unknown-support-flag — tool.io

Similar or alternative tools