Skip to content

Main content

Feature Null Run Length Tool

Count one consecutive run in a supplied null mask without treating false, zero or empty string as null.

Loading tool…

Description

Return a consecutive null-flag run from a supplied index.

Feature transformations depend on training-derived parameters, category vocabularies and explicit missing-value conventions. A local formula or token rule does not ensure that fitting, application and validation avoid data leakage.

Return a consecutive null-flag run from a supplied index.

When to use this tool

Use Feature Null Run Length when checking one supplied feature-transform or encoding component.

How to use the tool and how it works

  1. Enter isNull, startIndex. 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 runLength, endExclusive. Use the output convention below.

Return a consecutive null-flag run from a supplied index. Require whole startIndex in [0,length]; advance while flags are true and return runLength and endExclusive.1

Input fieldMeaning and unitsAccepted input
isNullIs NullRequired. Array of boolean; maximum items 256.
startIndexStart IndexRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
runLengthRun LengthRequired. Safe integer.
endExclusiveEnd ExclusiveRequired. Safe integer.
json
{
  "input": {
    "isNull": [
      false,
      true,
      true,
      false
    ],
    "startIndex": 1
  },
  "output": {
    "runLength": 2,
    "endExclusive": 3
  }
}

Limitations and assumptions

  • An index at array end returns an empty run; values are not inspected or missingness 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

Use a correctly fitted preprocessing pipeline and suitable validation design for complete data transformation and model assessment.

References

  1. Calculation and input contract: data-science/feature-null-run-length — tool.io

Similar or alternative tools