Hi Pierre,
Thanks a lot for your help..
So, using that script, I just separate my data in two parts,
right? For
using as training set the 70 % of the data and the rest as
test, should I
multiply the n with the 0.70 (for this case)?
Many thanks,
Chrysanthi
2009/4/12 Pierre Moffard <pier.moff at yahoo.fr>
Hi Chysanthi,
check out the randomForest package, with the function
a CV option. Sorry for not providing you with a lengthier
moment but I'm rather busy on a project. Let me know if you
Also, to split your data into two parts- the training and
can do (n the number of data points):
n<-length(data[,1])
indices<-sample(rep(c(TRUE,FALSE),each=n/2),round(n/2),replace=TRUE)
training_indices<-(1:n)[indices]
test_indices<-(1:n)[!indices]
Then, data[train,] is the training set and data[test,] is
Best,
Pierre
------------------------------
*De :* Chrysanthi A. <chrysain at gmail.com>
*? :* r-help at r-project..org
*Envoy? le :* Dimanche, 12 Avril 2009, 17h26mn 59s
*Objet :* [R] Running random forest using different
schemes
Hi,
I would like to run random Forest classification algorithm
accuracy of the prediction according to different training
schemes. For example, extracting 70% of the samples for
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]]