nnet is obtained with all vars, so-called oob error 1 - cor(predict(Nnet)[complete.cases(predict(Nnet)),1], Y[complete.cases(cbind(Y, xdata[, Nnet$coefnames]))])^2) an iterated process consists on creating a new nnet with the (1-vars.drop.frac)*vars more important obtained in the previous step and generating a new nnet 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 |
size |
nnet param: number of units in the hidden layer. Can be zero if there are skip-layer units |
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.