Skip to content

Main content

Train Test Time Gap Tool

Compare supplied time-split bounds and an explicit embargo without certifying absence of data leakage.

Loading tool…

Description

Check a supplied train/test separation against an embargo.

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.

Check a supplied train/test separation against an embargo.

When to use this tool

Use Train Test Time Gap when checking an explicit feature-time or split-membership condition.

How to use the tool and how it works

  1. Enter latestTrainingTime, earliestTestTime, embargoDuration. 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 gap, beyondEmbargo, embargoSatisfied. Inspect embargoSatisfied before interpreting the associated values.

Check a supplied train/test separation against an embargo. Require embargoDuration >= 0; gap = earliestTestTime-latestTrainingTime, beyondEmbargo subtracts embargo, embargoSatisfied includes equality.1

Input fieldMeaning and unitsAccepted input
latestTrainingTimeLatest Training TimeRequired. Finite number.
earliestTestTimeEarliest Test TimeRequired. Finite number.
embargoDurationEmbargo DurationRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
gapGapRequired. Finite number.
beyondEmbargoBeyond EmbargoRequired. Finite number.
embargoSatisfiedEmbargo SatisfiedRequired. Boolean.
json
{
  "input": {
    "latestTrainingTime": 100,
    "earliestTestTime": 120,
    "embargoDuration": 10
  },
  "output": {
    "gap": 20,
    "beyondEmbargo": 10,
    "embargoSatisfied": true
  }
}

Limitations and assumptions

  • Times share a common basis; this single boundary check does not establish a leakage-free validation design.
  • 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/train-test-time-gap — tool.io

Similar or alternative tools