0
$\begingroup$

After tuning hyper-parameters for a gradient boosted model, I have found that the best tree count (iterations) is a few thousand. I'm worried that such a high count might impact prediction performance. Can someone explain the relation between trees count and prediction time?

$\endgroup$

1 Answer 1

3
$\begingroup$

The time it takes to get a prediction from a model of gradient boosted classification trees should be linear in the number of trees. So getting predictions from a model with 1000 trees should take about twice as long as 500 trees, and about half as long as 2000 trees.

You'll need to test it yourself and check if it's fast enough for your use case. Modern libraries like xgboost can handle high numbers of trees with remarkable efficiency. One thing to keep in mind is that it's generally faster to get predictions for a whole block of test examples at once than it is to get the predictions one at a time.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.