numeraire.core.splitter.validation_split#

numeraire.core.splitter.validation_split(view: _V, valid_size: int) tuple[_V, _V][source]#

Split a (train) view into PIT (fit, valid): valid = the last valid_size dates.

The tuning pattern of the ML-cross-section protocols (fit candidate hyperparameters on fit, score them on valid, both strictly inside the train fold): fit keeps the fold’s calendar up to the cutoff with data truncated at the cutoff (so its supervised pairs never see valid-period returns — the usual horizon purge applies at the seam), while valid keeps the trailing dates with full history available for lagged features.

Estimators call this inside fit(train); the engine and splitter stay two-way. Assumes the view’s calendar is a contiguous run of its dates (true for engine train folds).