Enforce n_folds >= 2 for k-fold cross-validation