3

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.

Statham
  • 4,000
  • 2
  • 32
  • 45

1 Answers1

4

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:

Vivek Kumar
  • 35,217
  • 8
  • 109
  • 132