[R] How to use a validation set rather than the default cross-validation in rpart() ?

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 3 11:32:46 CEST 2006


On Wed, 3 May 2006, Quin Wills wrote:

> Many thanks. I'm using it for pruning and was hoping that rpart allows use
> of a validation set rather than cross-validation for generating a CP/error
> table.

Since it is not documented how to, why do you expect to?  Indeed, why do 
you think it would be a good idea?


> -----Original Message-----
> From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de]
> Sent: 03 May 2006 07:53
> To: Quin Wills
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] How to use a validation set rather than the default
> cross-validation in rpart() ?
>
> Quin Wills wrote:
>
>> I want use a validation set for my classification tree rather than the
>> default 10-fold validation in rpart() but can't see which arguments to use
>> to get this right. Advice appreciated thanks. I assume that this is
>> possible!
>
> You cannot for the internal algorithm that optimizes the splits of the
> tree. Of course you can do so for estimating the misclassification rate
> (or whatever), but this has nothing to do with rpart() itself....
>
> Uwe Ligges
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list