How to interpret chart generated by gbm.perf function? I'm new to GBM.Can you help me to understand the interpretation of gbm.perf function?
I used following code in R
best.iter = gbm.perf(train, method="cv") & got following chart. I used 3000 tress to generate GBM

 A: During boosting, simple base-learners are iterively combined to produce the final estimate. This graph shows the performance metric's evolution as the gradient boosting algorithm combines a progressively larger number of base learners. 
In particular, in the case of this classification task, the performance metric used in the Bernoulli deviance and the iterations themselves refer to the number of trees (the n.trees argument). Smaller deviance values correspond to better performance (simplistically, deviance relates directly to $-2$ times the likelihood estimate for the data's assumed distribution). Notice that you (correctly) specify method="cv"; this means that the algorithm evaluates the performance of the ensemble of learners using cross-validation, i.e. by using a random sub-sampling approach. It is vital to do that because otherwise it is extremely prone to over-fit our training set and have poor generalisation of our learner. Finally: the blue dashed line shows what is the optimal number of iterations according to the metric and validation procedure used; i.e. we should use all 3000 available base learners to get the best performance out of the model definition used. 
The gbm vignette is rather informative one would like to explore this further; Sect. 3.3. "Estimating the optimal number of iterations" should rather relevant for what is presented here.
