I\'m using the R wrapper for XGBoost. In the function xgb.cv, there is a folds parameter with the description
folds
list provides a po
This worked best for me:
custom.folds <- caret::createFolds(data$Label, k=10, list=T) xgbcv <- xgb.cv( params = params ,data = df ,maximize = F ,prediction = T ,metrics = "logloss" ,folds = custom.folds )