predictors

0th

Percentile

List predictors used in the model

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

Keywords
models
Usage
predictors(x, ...)

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

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

## S3 method for class 'BinaryTree': predictors(x, surrogate = TRUE, ...)

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

## S3 method for class 'classbagg': predictors(x, surrogate = TRUE, ...)

## S3 method for class 'dsa': predictors(x, cuts = NULL, ...)

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

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

## S3 method for class 'foba': predictors(x, k = NULL, ...)

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

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

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

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

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

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

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

## S3 method for class 'glmnet': predictors(x, lambda = NULL, ...)

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

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

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

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

## S3 method for class 'lars': predictors(x, s = NULL, ...)

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

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

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

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

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

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

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

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

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

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

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

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

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

## S3 method for class 'pamrtrained': predictors(x, newdata = NULL, threshold = NULL, ...)

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

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

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

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

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

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

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

## S3 method for class 'regbagg': predictors(x, surrogate = TRUE, ...)

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

## S3 method for class 'rpart': predictors(x, surrogate = TRUE, ...)

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

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

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

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

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

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

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

## S3 method for class 'superpc': predictors(x, newdata = NULL, threshold = NULL, n.components = NULL, ...)

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

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

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

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

Arguments
x
a model object, list or terms
newdata
for pamr.train and superpc.train: the training data
threshold
for pamr.train and superpc.train: the feature selection threshold
n.components
for superpc.train: the number of PCA components used
surrogate
a logical for rpart, ipredbagg, ctree and c
lambda
for glmnet: the L1 regularization value
s
for lars: the path index. See predict.lars
k
for foba: the sparsity level (i.e. the number of selected terms for the model). See predict.foba
cuts
the number of rule sets to use in the model (for partDSA only)
...
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.

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.

Aliases
  • predictors
  • predictors.BinaryTree
  • predictors.LogitBoost
  • predictors.NaiveBayes
  • predictors.RandomForest
  • predictors.Weka_classifier
  • predictors.bagEarth
  • predictors.bagFDA
  • predictors.blackboost
  • predictors.classbagg
  • predictors.earth
  • predictors.fda
  • predictors.formula
  • predictors.gam
  • predictors.gamboost
  • predictors.gausspr
  • predictors.gbm
  • predictors.glmboost
  • predictors.gpls
  • predictors.knn3
  • predictors.ksvm
  • predictors.lda
  • predictors.logforest
  • predictors.logicBagg
  • predictors.logreg
  • predictors.list
  • predictors.lm
  • predictors.lssvm
  • predictors.multinom
  • predictors.mvr
  • predictors.nnet
  • predictors.pamrtrained
  • predictors.pcaNNet
  • predictors.ppr
  • predictors.randomForest
  • predictors.RandomForest
  • predictors.rda
  • predictors.regbagg
  • predictors.rpart
  • predictors.rvm
  • predictors.slda
  • predictors.superpc
  • predictors.terms
  • predictors.train
  • predictors.rfe
  • predictors.spls
  • predictors.splsda
  • predictors.glm
  • predictors.mda
  • predictors.glmnet
  • predictors.qda
  • predictors.penfit
  • predictors.lars
  • predictors.sda
  • predictors.trocc
  • predictors.foba
  • predictors.knnreg
  • predictors.ppr
  • predictors.sbf
  • predictors.smda
  • predictors.dsa
Documentation reproduced from package caret, version 5.15-052, License: GPL-2

Community examples

Looks like there are no examples yet.