0

I am learning XGBoost and I am using python (3.x). I came cross the XGBoost cv function. Suppose, I have two models gbt1 and gbt2 which I created using XGBClassifier. Now, I was looking to use the CV method of XGBoost for cross validation. I noticed that I didn't nee to specify which model I am trying to optimize here. I just need to pass the param and DMatrix. My question here is how XGBoost determine what model or estimator use ?

cv_df = xgb.cv(params, DTrain, num_boost_round = 5, nfold=n_folds,
            early_stopping_rounds= early_stopping)
  • Perhaps https://stackoverflow.com/questions/34469038/understanding-python-xgboost-cv may help. – Stoner Sep 15 '19 at 08:50
  • Thank you. My question is different. I have fair understanding of cross validation and how it is different from GridSerachCV. My question here is how cv function know which estimator or model to use for cross validation. – user3235267 Sep 15 '19 at 09:30

0 Answers0