timeseriescv
timeseriescv copied to clipboard
max value for n_test_splits
In the __init__ method of PurgedKFoldWalkForward, an if statement raises an error if n_test_splits >= self.n_splits - 1 (line 105).
In the __init__ method of CombPurgedKFoldCV, a similar check on n_test_splits check raises an error if n_test_splits >= self.n_splits - 1 (line 274).
I believe the __init__ method in PurgedKFoldWalkForward is wrong, n_test_splits could well be equal to n_splits - 1. That would still leave one train/test split overall.
I also think that min_train_splits can also be equal to n_splits - n_test_splits (line 114).