I am using XGBoost cv to find the optimal number of rounds for my model. I would be very grateful if someone could confirm (or refute), the optimal number of rounds is:
estop = 40res = xgb.cv(params, dvisibletrain, num_boost_round=1000000000, nfold=5, early_stopping_rounds=estop, seed=SEED, stratified=True)best_nrounds = res.shape[0] - estopbest_nrounds = int(best_nrounds / 0.8)
i.e: the total number of rounds completed is res.shape[0], so to get the optimal number of rounds, we subtract the number of early stopping rounds.
Then, we scale up the number of rounds, based on the fraction used for validation. Is that correct?