I use StratifiedKFold and a form of grid search for my Logistic Regression.
skf = StratifiedKFold(n_splits=6, shuffle=True, random_state=SEED)
I call this for loop for each combination of parameters:
for fold, (trn_idx, test_idx) in enumerate(skf.split(X, y)):
My question is, are trn_idx
and test_idx
the same for each fold every time I run the loop?
For example, if fold0
contains trn_dx = [1,2,5,7,8]
and test_idx = [3,4,6]
, is fold0
going to contain the same trn_idx
and test_idx
the next 5 times I run the loop?