numeraire.validation_split#
- numeraire.validation_split(view: _V, valid_size: int) tuple[_V, _V][source]#
Split a (train) view into PIT
(fit, valid): valid = the lastvalid_sizedates.The tuning pattern of the ML-cross-section protocols (fit candidate hyperparameters on
fit, score them onvalid, both strictly inside the train fold):fitkeeps 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), whilevalidkeeps 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).