I am trying to run xgboost.cv function to get the optimal iteration (nrounds). However, it does not seem to converge. The result does not give me a best iteration result. Is there anything wrong with my code?
xgbcv <- xgb.cv(params = params, data = dtrain, nrounds = 1000, nfold = 5, showsd = T, stratified = T, print_every_n = 10, early_stop_round = 100, maximize = F )