[R] using bootstrap for tree selection step in rpart

Christian Schäfer schaefer at pointone.de
Tue Sep 11 07:40:34 CEST 2007


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



More information about the R-help mailing list