[R] rpart - the xval argument in rpart.control and in xpred.rpart

Paolo Radaelli paolo.radaelli at unimib.it
Tue Jun 9 15:57:50 CEST 2009


Usually 10-fold cross validation is performed more than once to get an 
estimate of the misclassification rate thus I thought "number of 
cross-validations" was different from the "number of cross-validation 
groups". So, if I want to perform 10-fold cross-validation more than once 
(say 5) in order to estimate the miscalssification rate I have to run 
xpred.rpart 5 times ?
Thanks
Paolo


>> I have some problems in understanding the meaning of the xval argument in
>> the two functions rpart.control and xpred.rpart. In the former it is 
>> defined
>> as the number of cross-validations while in the latter it is defined as 
>> the
>> number of cross-validation groups.
>  It is the same thing.  If xval=10 then the data is divided into 10 
> disjoint
> groups.  A model is fit with group 1 left out and that model is used to 
> predict
> the observations in group 1; then a model is fit with group 2 left out; 
> then
> group 3, ...
>   So 10 groups = 10 fits of the model.



Actually I thought that in rpart.control

>
>
>
>   Terry Therneau
>
>




More information about the R-help mailing list