Fiona Callaghan
2007-Sep-10 21:17 UTC
[R] using bootstrap for tree selection step in rpart
Hi I was wondering if someone could help me with an rpart problem. I can see that cross-validation is the default for tree selection in rpart -- has a bootstrap method been implemented anywhere? I think this is a different thing to 'bagging' or 'boosting' -- I still want 'one' tree at the end, I just would like it chosen using a bootstrap method. Any ideas??? Thanks Fiona -- Fiona Callaghan, MA MS A432 Crabtree Hall Department of Biostatistics Graduate School of Public Health University of Pittsburgh Phone 412 624 3063
Christian Schäfer
2007-Sep-11 05:40 UTC
[R] using bootstrap for tree selection step in rpart
Fiona Callaghan wrote:> I was wondering if someone could help me with an rpart problem. I can see > that cross-validation is the default for tree selection in rpart -- has a > bootstrap method been implemented anywhere? I think this is a different > thing to 'bagging' or 'boosting' -- I still want 'one' tree at the end, I > just would like it chosen using a bootstrap method. Any ideas???Hi Fiona, I'm not sure if I understand you correctly. To get one single rpart tree trained on one bootstrap sample, try bagging() from the 'ipred' package and set nbagg=1. Bye, Chris