On Thu, 28 Dec 2006, Weiwei Shi wrote: > n-fold cv is easy to be implemented in R by yourself. you can create > 10 folds' samples by yourself and disable cv in rpart. Then you can > use the same sample sets to compare different methods.
BUT, rpart uses CV to select the cost-complexity parameter, so you need not to disable its internal CV or you are not using rpart. CV for parameter tuning and CV for validation are not the same thing. There are examples of using n-fold CV for validation, including with trees, in MASS4. > > HTH > > weiwei > > On 12/28/06, Pedro Ramirez <[EMAIL PROTECTED]> wrote: >> Dear R-list, >> >> I am using the rpart/mvpart-package for selecting a right-sized >> regression tree by 10-fold cross-validation. My question: Is there a >> possibility to find out for every observation in which of the ten folds >> it is lying? I want to use the same folds for validating another >> regression method (moving averages) in order to choose the better one. >> >> Thanks a lot, >> Pedro -- Brian D. Ripley, [EMAIL PROTECTED] 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 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
