Skip to content

Main content

Feature Lag Calendar Row Offset Tool

Positional lag on an already ordered calendar-row table; missing calendar periods must be represented explicitly.

Loading tool…

Description

Return a row-lag source index and availability flag.

Model validation depends on when information became available and how records or entities enter splits. A timestamp inequality or group overlap count can identify one local issue without proving absence of every form of leakage.

Return a row-lag source index and availability flag.

When to use this tool

Use Feature Lag Calendar Row Offset when checking an explicit feature-time or split-membership condition.

How to use the tool and how it works

  1. Enter row, lag, rowCount. 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 sourceRow, available. Inspect available before interpreting the associated values.

Return a row-lag source index and availability flag. Require positive whole rowCount and valid row; sourceRow = row-lag, available tests whether it remains in [0,rowCount).1

Input fieldMeaning and unitsAccepted input
rowRowRequired. Safe integer; minimum 0.
lagSigned whole row lag; a negative value points to a later row and is accepted.Required. Safe integer.
rowCountRow CountRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
sourceRowSource RowRequired. Safe integer.
availableWhether sourceRow lies in [0,rowCount); this is not a causal-availability check.Required. Boolean.
json
{
  "input": {
    "row": 5,
    "lag": 2,
    "rowCount": 10
  },
  "output": {
    "sourceRow": 3,
    "available": true
  }
}

Limitations and assumptions

  • This is row arithmetic, not calendar lagging; negative lag can reference a future row.
  • 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 data-provenance and validation-design review, including label horizons, entity dependence and preprocessing fit scope.

References

  1. Calculation and input contract: data-science/feature-lag-calendar-row-offset — tool.io

Similar or alternative tools