Skip to content

Instantly share code, notes, and snippets.

@grantbrown
Created February 1, 2015 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grantbrown/92d6041c294acb90d5fd to your computer and use it in GitHub Desktop.
Save grantbrown/92d6041c294acb90d5fd to your computer and use it in GitHub Desktop.
Quick gbm script
library(gbm)
data(iris)
q = gbm(Species~.,
distribution="multinomial",
data=iris,
interaction.depth=4,
shrinkage = 0.01,
n.minobsinnode=max(30,ceiling(nrow(iris)*0.001)),
n.cores=1,
n.trees=100)
q2 = gbm.more(q, n.new.trees=100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment