predictors: List predictors used in the model

Description Usage Arguments Details Value

Description

This class uses a model fit to determine which predictors were used in the final model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
predictors(x, ...)

## Default S3 method:
predictors(x,  ...)

## S3 method for class 'formula'
predictors(x,  ...)

## S3 method for class 'list'
predictors(x,  ...)

## S3 method for class 'rfe'
predictors(x,  ...)

## S3 method for class 'sbf'
predictors(x,  ...)

## S3 method for class 'terms'
predictors(x,  ...)

## S3 method for class 'train'
predictors(x,  ...)

Arguments

x

a model object, list or terms

...

not currently used

Details

For randomForest, cforest, ctree, rpart, ipredbagg, bagging, earth, fda, pamr.train, superpc.train, bagEarth and bagFDA, an attempt was made to report the predictors that were actually used in the final model.

The predictors function can be called on the model object (as opposed to the train) object) and the package will try to find the appropriate coed (if it exists).

In cases where the predictors cannot be determined, NA is returned. For example, nnet may return missing values from predictors.

Value

a character string of predictors or NA.


caret documentation built on May 2, 2019, 5:47 p.m.

Related to predictors in caret...