VSURF
function. For refined variable selection, see VSURF other steps: VSURF.interp
and VSURF.pred
.## S3 method for class 'formula':
VSURF.thres(formula, data, ..., na.action=na.fail)
## S3 method for class 'default':
VSURF.thres(x, y, ntree=2000, mtry=max(floor(ncol(x)/3), 1),
nfor.thres=50, nmin=1, ...)
randomForest
it is only used with the formula-type call.)randomForest
parameter.randomForest
parameter.randomForest
function (see ?randomForest for further information)VSURF.thres
, which is a list with the following
components:varselect.thres
variables.$x
contains the mean importances in decreasing order. $ix
contains indices of the variables.ord.imp
.VSURF.thres
nfor.thres
random forests are computed using the function
randomForest
with arguments importance=TRUE
. Then
variables are sorted according to their mean variable importance (VI),
in decreasing order. This order is kept all along the procedure.
Next, a threshold is computed: min.thres
, the minimum predicted
value of a pruned CART tree fitted to the curve of the standard
deviations of VI.
Finally, the actual thresholding is performed: only variables with a
mean VI larger than nmin
* min.thres
are kept.VSURF
, tune
data(iris)
iris.thres <- VSURF.thres(x=iris[,1:4], y=iris[,5], ntree=100, nfor.thres=20)
iris.thres
# A more interesting example with toys data (see \code{\link{toys}})
# (a few minutes to execute)
data(toys)
toys.thres <- VSURF.thres(x=toys$x, y=toys$y)
toys.thres
Run the code above in your browser using DataLab