powered by
"predict"(object, newdata, n.trees, type = "link", single.tree = FALSE, ...)
library(gbm) x=matrix(rnorm(100*20),100,20) y=rbinom(100,1,0.5) fit=tsp.gbm(x,y) predict(fit,x[1:10,],n.trees=5)
Run the code above in your browser using DataLab