matrix or data frame containing columns of predictor variables
trainy
vector of response, must have length equal to the number of rows in
trainx
cv.fold
The fold, the defalut is 5.
scale
If "log", reduce a fixed proportion (step) of variables
at each step, otherwise reduce step variables at a time
step
If log=TRUE, the fraction of variables to remove at each step,
else remove this many variables at a time
mtry
A function of number of remaining predictor variables to use as the
mtry parameter in the randomForest call
recursive
Whether variable importance is (re-)assessed at each step of variable
reduction
Value
A list with the following three components::
n.var - vector of number of variables used at each step
error.cv - corresponding vector of error rates or MSEs at each step
res - list of n.var components, each containing the feature importance values from
the cross-validation
Details
This function shows the cross-validated prediction performance of models with
sequentially reduced number of predictors (ranked by variable importance) via
a nested cross-validation procedure.
References
Svetnik, V., Liaw, A., Tong, C. and Wang, T., Application of Breiman's Random
Forest to Modeling Structure-Activity Relationships of Pharmaceutical Molecules,
MCS 2004, Roli, F. and Windeatt, T. (Eds.) pp. 334-343.
See Also
See rf.cv for the Cross-Validation of Classification and
Regression models using Random Forest