

you need to include in your code something like:

tree<-rpart(result~., data, control=rpart.control(xval=10)).

this xval=10 is 10-fold CV.

Best,
Pierre


________________________________
De : Chrysanthi A. <chrysain@gmail.com>
À : r-help@r-project.org
Envoyé le : Dimanche, 12 Avril 2009, 17h26mn 59s
Objet : [R] Running random forest using different training and testing schemes

Hi,

I would like to run random Forest classification algorithm and check the
accuracy of the prediction according to different training and testing
schemes. For example, extracting 70% of the samples for training and the
rest for testing, or using 10-fold cross validation scheme.
How can I do that? Is there a function?

Thanks a lot,

Chrysanthi.

    [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.



      
	[[alternative HTML version deleted]]

