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)