0

First, we split the dataset using stratify parameter

train_test_split(np.array(X), y, train_size=TRAIN_SIZE, stratify=y, random_state=42)

and then apply KFlod Cross Validation

kfold = KFold(n_splits=num_folds, shuffle=True)
fold_no = 1
for train, test in kfold.split(inputs, targets):

Does this code have any drawbacks?

0 Answers0