Suppose that the circles in red are negative samples and the circles in blue are positive samples and that the green boxes are the validation set and all the blank boxes are the training set. In addition, suppose I charge the following data:
The loaded data is sorting, first the positive samples and then the negative samples. If I now perform cross-validation, taking disjoint but consecutive folds (and with ordered positive samples and ordered negative samples):
If instead of performing the previous cross-validation, I do it in the following way, taking disjoint but not consecutive folds (and with ordered positive samples and ordered negative samples) which gives rise to random folds for both training and testing:
These are the first two forms of cross-validation that I think can be implemented.
Or, if I decide to load the data in the following way:
The loaded data is cluttered, that is, loaded randomly. If I now perform cross-validation, taking disjoint but consecutive folds (and with disordered positive samples and disordered negative samples) which still gives rise to random folds for both training and testing:
Finally, if I perform cross-validation by taking disjoint but not consecutive folds (and with positive samples disordered and disordered negative samples) which also results in random folds for both training and testing:
Of these 4 ways in which I think it can be implemented, what is the "correct" way to perform cross-validation? What is the advantage / disadvantage between one and the other? Is there any criteria to make this choice? Thanks in advance