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).
In the
__init__method ofPurgedKFoldWalkForward, anifstatement raises an error ifn_test_splits >= self.n_splits - 1(line 105).In the
__init__method ofCombPurgedKFoldCV, a similar check onn_test_splitscheck raises an error ifn_test_splits >= self.n_splits - 1(line 274).I believe the
__init__method inPurgedKFoldWalkForwardis wrong,n_test_splitscould well be equal ton_splits - 1. That would still leave one train/test split overall.I also think that
min_train_splitscan also be equal ton_splits - n_test_splits(line 114).