repeated cross-validation shows similar results for different k-folds

I need to see whether different k-fold cross-validations with repeats will improve my classification accuracy.

For that, I have tested with repeatedCV (k-fold=50, repeat=10, k-fold=100, repeat=10, and k-fold=1000, repeat=10)

But, accuracy values in the confusion matrix are same for the above different repeated cross-validations.

Please see my code below. I am using caret package for training the data.

I am thinking whether I am getting the same accuracy results because my my model is stable/robust or due to some other reason.

Any help is appreciated.

standardized.X <- LossT[,-c(1:10)]
set.seed(50)
ind <- createDataPartition(LossT$LRPPcat, p=0.85, list = FALSE) train.X <- standardized.X[ind,] test.X <- standardized.X[-ind,] train.Y=LossT$LRPPcat[ind]
test.Y=LossT$LRPPcat[-ind] set.seed(123) seeds <- vector(mode = "list", length = 501) for(i in 1:501) seeds[[i]] <- sample.int(1000, 20) ## For the last model: seeds[[501]] <- sample.int(1000, 1) # Train the model ctrl <- trainControl(method = "repeatedcv",number = 50, repeats = 10, preProcOptions = list(thresh = 0.85, k = 5),seeds = seeds, selectionFunction = "best", savePredictions = TRUE, allowParallel = TRUE) modelknn <- train(train.X,train.Y, method = "knn",preProcess = c("pca"), trControl = ctrl,metric = "Accuracy",tuneLength = 20) fitted.results <- predict(modelknn,test.X) cm <- confusionMatrix(data=fitted.results, reference=test.Y)  • I think you have a misunderstanding about what cross validation is for. K is not a tuning parameter in a model, it does not change the complexity of the model being fit to the data. Different k's give you different estimates of the same quantity, for the same model, for the same population. Aug 8, 2017 at 14:28 • Thanks for your reply and appreciate it. But, when used "knn" the numbers of nearest neighbors (k) is the tuning parameter. That's why I have put the tuning length there. But, I cannot understand the reason why for different repeatedCV gives me the same classification output results. Any idea? Thanks again. Aug 8, 2017 at 17:12 • As Matthew Drury pointed out, the$k$in CV is not a tuning parameter. Conversely, the$k\$ in KNN is. There is no relationship between the two. Perhaps you might want to review a textbook on these matters. Aug 8, 2017 at 21:18
• @Ami, Thanks for your comment. I totally understand it. Do you think my code needs to be revised? If yes, where should I change? Please let me know. Thanks a lot again. Aug 9, 2017 at 14:25