demo/multinomial.R

data( iris )
set.seed( 20090415 )

mod <- gbm(Species ~ ., 
           data              = iris, 
           distribution      = "multinomial",
           n.tree            = 5000, 
           shrinkage         = 0.001, 
           cv.folds          = 2,
           bag.fraction      = 0.8,
           interaction.depth = 3,
           verbose = FALSE)
gbm.perf( mod, method="cv" )
mod

Try the gbm package in your browser

Any scripts or data that you put into this service are public.

gbm documentation built on June 28, 2024, 9:07 a.m.