My training set has 13,737 observations with 53 predictors. I need to compare the accuracy of Random Forest vs. GBM.
For Random Forest, I set ntree = 128
[based on Oshiro et al. (2012)] in train(data=trainset, y~., method = "rf", ntree = 128)
because the default (500) was taking far too long. At 128 trees, it took 1.25 hours.
Now in train(data=trainset, y~., method = "gbm", verbose = FALSE)
, I have not changed the default n.tree value (100). It has been running for 2 hour now...
Should I set n.tree in gbm also to 128?
Would it be wrong to compare it against random forest otherwise?
Please advise.
Thank you!
sampsize
such assampsize=1000
. At the moment, each bootstrap sample of your data is of size 8681, which is the main reason why it is taking so long. $\endgroup$replace=T
but it might be the other way round. $\endgroup$