[datatable-help] Random Forest

Hounkpatin Ozias ozias_hounkpatin at yahoo.fr
Wed Sep 24 08:55:20 CEST 2014


Hello to everyone,

I am interested in doing some iteration in using Random Forest (classification purpose) with different value of mtry= 2, 4, 6, 9, 12. I want to repeat each run 100 times. that is with mtry=2 for example, run it 100 times. As output, I would like to have the aggregate out of bag errors (total means over the 100 runs) as well as well as the variable importance based on this 100 runs aggregated over their OBB errors. One could try it one by one, report each value but it is very laborious. Is there anyway to have R run the Random Forest 100 times, and give me as output the resulting (aggregated means) OOB errors and variable importance. here was my code. 

r2  <-  randomForest(Factor  ~  .,  data=tr, nodesize  = 1,ntree=1000, importance=TRUE, proximity=TRUE, mtry=2) 
#I want a 100 run of this
#get average OOB errors
#get variable importance based on these aggregated OBB errors.

Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140924/97053ba4/attachment.html>


More information about the datatable-help mailing list