Skip to content
ML Academy

Introduced on day 25

Gap (embargo) between training and test

Points deliberately left out between the end of the training window and the start of the test block, at least as long as the longest feature window or label span.

In detail

When features look back over a window or labels look forward over a span, rows near the end of training share information with the test block. A gap removes that overlap; in scikit-learn, TimeSeriesSplit(gap=g) drops g samples from the end of each training set. For a direct model at horizon h the unlabelled h steps before the test row play the same role, and late-revised labels call for evaluating with the value known at the cutoff.