# # EPage 374 # # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- library(DAAG) library(MASS) library(randomForest) set.seed(0) # Run the model on all the data: randomForest(as.factor(type) ~ ., data=Pima.tr) # Run the model on a subset of data: rowsamp = sample( dim(Pima.tr)[1], replace=TRUE ) randomForest( as.factor(type) ~ ., data=Pima.tr[rowsamp,] )