Skip to content
Quantoros

How do you select the number of trees in the gradient boosting model?

Classic MLLevel: IntermediateGradient boosting

How do you select the number of trees in the gradient boosting model?

Hints
  • What does the next learner predict relative to the current ensemble?
  • Connect sequential model additions to loss optimization.

Answer

Most implementations of gradient boosting are configured by default with a relatively small number of trees, such as hundreds or thousands. Using scikit-learn we can perform a grid search of the n_estimators model parameter

Source and licence: Alexey Grigorev & contributors — Data Science Interviews · CC-BY-4.0

Related questions