# Predicting optimal of iterations and completion time for GBM

[This article was first published on

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

When choosing the hyperparameters for Generalized Boosted Regression Models, two important choices are shrinkage and the number of trees. Generally a smaller shrinkage with more trees produces a better model, but the modeling time significantly increases. Building a model with too many trees that are heavily cut back by cross validation wastes time, while building a model with too few trees may require starting over with a larger number of trees—also a waste of time. So here I present a simple way to estimate the optimal number of trees and the modeling time for GBM as implemented in the R package gbm. Continue reading
**Heuristic Andrew » r-project**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

To

**leave a comment**for the author, please follow the link and comment on their blog:**Heuristic Andrew » r-project**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.