I am trying to compare two different models with cross validation and I am not sure whether I choosed an effective way to split my dataset into equal sized partitions. My data frame is called
anne and I tried this before the loop:
anne<-anne[sample(nrow(anne)),] my_folds<- cut(seq(1,nrow(anne)),breaks=10,labels=FALSE)
Since I want to do comparisons of different models the partions are very important.
Is this a good way to create my partitions?
Is it better if I use the
createDataPartition(anne$response, p=.80, list=FALSE)
ps. I also used the