As I understand when setting
trainControl(method="cv") in the caret package, my training set is is split into K folds for cross validation. How is this splitting done? I assume it is randomized and stratified?
But the train set has been "upsampled" and if the split is randomized there will be a data leak over the train and test folds. (which lead to a overfit of course.) So, how can I avoid that the split is randomized and stratified? I want the folds to be made of consecutive samples. Can that be achieved?