train and method specific methods## S3 method for class 'train':
varImp(object, useModel = TRUE, nonpara = TRUE, scale = TRUE, ...)
## S3 method for class 'earth':
varImp(object, value = "gcv", ...)
## S3 method for class 'rpart':
varImp(object, ...)
## S3 method for class 'randomForest':
varImp(object, ...)
## S3 method for class 'gbm':
varImp(object, numTrees, ...)
## S3 method for class 'classbagg':
varImp(object, ...)
## S3 method for class 'regbagg':
varImp(object, ...)
## S3 method for class 'pamrtrained':
varImp(object, threshold, data, ...)
## S3 method for class 'lm':
varImp(object, ...)
## S3 method for class 'mvr':
varImp(object, ...)
## S3 method for class 'bagEarth':
varImp(object, ...)
## S3 method for class 'RandomForest':
varImp(object, normalize = TRUE, ...)useModel = FALSE and
only passed to filterVarImp).varImp methodspamr models only)pamr models only)gcv, nsubsets, or rssc("varImp.train", "data.frame") for
varImp.train or a matrix for other models.varImp methods, see
filerVarImp.Otherwise:
varImp.randomForest and
varImp.RandomForest are wrappers around the importance functions from the
maxcompete
argument in rpart.control. This method does not currently provide
class--specific measures of importance when the response is a factor.
varImp.gbm is a wrapper around the function from that package (see the varImp function tracks the changes in
model statistics, such as the GCV, for each predictor and
accumulates the reduction in the statistic when each
predictor's feature is added to the model. This total reduction
is used as the variable importance measure. If a predictor was
never used in any of the MARS basis functions in the final model
(after pruning), it has an importance
value of zero. Prior to June 2008, the package used an internal function
for these calculations. Currently, the varImp is a wrapper to
the evimp function in the earth package. There are three statistics that can be used to
estimate variable importance in MARS models. Using
varImp(object, value = "gcv") tracks the reduction in the
generalized cross-validation statistic as terms are added.
However, there are some cases when terms are retained
in the model that result in an increase in GCV. Negative variable
importance values for MARS are set to zero.
Alternatively, using
varImp(object, value = "rss") monitors the change in the
residual sums of squares (RSS) as terms are added, which will
never be negative.
Also, the option varImp(object, value ="nsubsets"), which
counts the number of subsets where the variable is used (in the final,
pruned model).
pamr.predict). The larger the difference between the class centroid and the overall center of the data, the larger the separation between the classes. The training set predictions must be supplied when an object of class pamrtrained is given to varImp.
[object Object]