Random forest is obtained with all vars, oob error is computed and the most important variables an iterated process consists on creating a new rf with the (1-vars.drop.frac)*vars more important obtained in the previous step and generating a new rf model. The process stops when abs(mean(oob error)+sd(oob error)) is >= than previous step or only two vars are left
1 |
xdata |
data set to be analyzed |
Y |
var to analyze |
ntree |
number of trees |
vars.drop.frac |
fraction of variables removed at each iteration step, it selects the most important variables 1-fraction at each step |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.