ntree parameter in predict.gbm What is the use of the ntrees paramater in the predict function for gbm models in R ?
When we fit a gbm model, we have already specified the number of trees and the model has been produced accordingly. Is it that the predict function can choose in the model produced at which level of number of trees it should be used ?
 A: From the documentation:

predict.gbm produces predicted values for each observation in newdata
  using the the first n.trees iterations of the boosting sequence. If
  n.trees is a vector than the result is a matrix with each column
  representing the predictions from gbm models with n.trees[1]
  iterations, n.trees[2] iterations, and so on.

Since GBM trains the models in serial, you can tell gbm.predict to only use the first n.trees number of trees. Or you can tell it to give you the predictions from multiple numbers of n.trees. I assume you can use this to look at questions like, "After how many trees do my predictions level-off in their accuracy?"
This also means that you cannot specify a higher n.trees than you did in training the model. If you do, it will give you a warning message and do predictions based on how many n.trees you fit the model on. See the code at https://github.com/cran/gbm/blob/master/R/predict.gbm.R#L57-L58:
n.trees[n.trees>object$n.trees] <- object$n.trees
warning("Number of trees not specified or exceeded number fit so far. Using ",paste(n.trees,collapse=" "),".")

A: A good use of that parameter is saving time on hyperparameter tuning. Suppose you want to tune the model on number of trees with a test data set. And you want to try from 1000 to 5000 trees, step by 1000. 
Instead of building 5 models, you can just build one model with 5000 tree, and use this ntree parameter to see the performance on 1000 to 4000 trees!
