I am running the following code:
params = {"objective":"reg:squarederror",'colsample_bytree': 0.3,'learning_rate': 0.15,
'max_depth': 5, 'alpha': 15}
data_dmatrix = xgb.DMatrix(data=X_train,label=y_train)
cv_results = xgb.cv(dtrain=data_dmatrix, params=params, nfold=3,
num_boost_round=50, early_stopping_rounds=10,
metrics="rmse", as_pandas=True, seed=0)
The result looks great and I would like to test the best model from the cross validation with my data I held back. But how can I get the model?