If I use xgb.train, how can i specify the number of the trees in my model ?
In xgboost.XGBRegressor(), I know i can use parameter 'n_estimators', but what should I do in xgb.train()?
I searched Google and didn't find any answer, thanks in advance.
If I use xgb.train, how can i specify the number of the trees in my model ?
In xgboost.XGBRegressor(), I know i can use parameter 'n_estimators', but what should I do in xgb.train()?
I searched Google and didn't find any answer, thanks in advance.
Its num_boost_round
. As stated on the api documentation:
num_boost_round (int) – Number of boosting iterations.
To exactly match the output of xgb.train and scikit wrapper (XGBRegressor or XGBClassifier) you can look at my other answer here: