Hi Kristi,
One year later I've been with the same question and found a solution with
the help (see plot.gbm: Marginal plots of fitted gbm objects.)
If your GBM-model is gbm1 <- gbm(y ~ x1+x2, .) one can get the
coefficients for each x with:
print(plot(gbm1, i.var=1, n.trees=1000, return.grid=TRUE)) print(plot(gbm1,
2, return.grid=TRUE))
print(plot(gbm1, i.var=2, n.trees=1000, return.grid=TRUE)) print(plot(gbm1,
2, return.grid=TRUE))
This includes all trees from 1 to 1000. Without "return.grid=TRUE" the
graphic is shown. Additionally one can see the coefficients for up to 3-way
interactions:
print(plot(gbm1, i.var=c(1,2), n.trees=1000, return.grid=TRUE))
print(plot(gbm1, 2, return.grid=TRUE))
Hope that helps for others searching for the same thing!
Samuel
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.