rfeControl
From caret v4.65
by Max Kuhn
Controlling the Feature Selection Algorithms
This function generates a control object that can be used to specify the details of the feature selection algorithms used in this package.
- Keywords
- utilities
Usage
rfeControl(functions = NULL,
rerank = FALSE,
method = "boot",
saveDetails = FALSE,
number = ifelse(method %in% c("cv", "repeatedcv"), 10, 25),
repeats = ifelse(method %in% c("cv", "repeatedcv"), 1, number),
verbose = TRUE,
returnResamp = "all",
p = .75,
index = NULL,
workers = 1,
computeFunction = lapply,
computeArgs = NULL)
Arguments
- functions
- a list of functions for model fitting, prediction and variable importance (see Details below)
- rerank
- a logical: should variable importance be re-calculated each time features are removed?
- method
- The external resampling method:
boot
,cv
,LOOCV
orLGOCV
(for repeated training/test splits - number
- Either the number of folds or number of resampling iterations
- repeats
- For repeated k-fold cross-validation only: the number of complete sets of folds to compute
- saveDetails
- a logical to save the predictions and variable importances from the selection process
- verbose
- a logical to print a log for each external resampling iteration
- returnResamp
- A character string indicating how much of the resampled summary metrics should be saved. Values can be ``final'', ``all'' or ``none''
- p
- For leave-group out cross-validation: the training percentage
- index
- a list with elements for each external resampling iteration. Each list element is the sample rows used for training at that iteration.
- workers
- an integer that specifies how many machines/processors will be used
- computeFunction
- a function that is
lapply
or emulateslapply
. It must have argumentsX
,FUN
and...
.computeFunction
can be used to build models in parall - computeArgs
- Extra arguments to pass into the
...
slore incomputeFunction
. See the examples inrfe
.
Details
Backwards selection requires function to be specified for some operations.
The fit
function builds the model based on the current data set. The arguments for the function must be:
x
y
first
last
first
, but TRUE
when the last model is fit with the final subset size and
predictors.}
...
rfe
}
Value
- A list
code
itemize
y
item
x
x
y
metric
maximize
size
pkg
caret
See Also
rfe
, lmFuncs
, rfFuncs
, treebagFuncs
, nbFuncs
, pickSizeBest
, pickSizeTolerance
Community examples
Looks like there are no examples yet.