Reputation: 4118
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.
Upvotes: 3
Views: 3828
Reputation: 36599
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:
Upvotes: 4