This PR updates the rolling-origin/sliding window cross-validation methodology used to choose hyperparameters for the main model. Mainly, it adds a dedicated function to calculate sliding window resamples with the following improvements:
Can seamlessly swap between random (v-fold) and recent (sliding window) based CV by setting the validation_type parameter. No longer need to change other code
Sliding window folds can now be non-cumulative i.e. the window is a fixed with and moves forward in time, rather than the window origin always being the start date of the data
The sliding window can still be made cumulative via a toggle
Both cumulative and non-cumulative sliding window folds can be made overlapping by N months. The function will shrink or grow the training fold to cover the entire training data with V folds and N months of overlap per fold
This PR updates the rolling-origin/sliding window cross-validation methodology used to choose hyperparameters for the main model. Mainly, it adds a dedicated function to calculate sliding window resamples with the following improvements:
random
(v-fold) andrecent
(sliding window) based CV by setting thevalidation_type
parameter. No longer need to change other code