sbfControl {caret}R Documentation

Control Object for Selection By Filtering (SBF)

Description

Controls the execution of models with simple filters for feature selection

Usage

sbfControl(functions = NULL, 
           method = "boot", 
           saveDetails = FALSE, 
           number = ifelse(method == "cv", 10, 25), 
           verbose = TRUE, 
           returnResamp = "all", 
           p = 0.75, 
           index = NULL, 
           workers = 1, 
           computeFunction = lapply, 
           computeArgs = NULL)

Arguments

functions a list of functions for model fitting, prediction and variable filtering (see Details below)
method The external resampling method: boot, cv, LOOCV or LGOCV (for repeated training/test splits
number Either the number of folds or number of resampling iterations
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 ``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 emulates lapply. It must have arguments X, FUN and .... computeFunction can be used to build models in parallel. See the examples in sbf.
computeArgs Extra arguments to pass into the ... slore in computeFunction. See the examples in sbf.

Details

Simple filter-based feature 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:

The function should return a model object that can be used to generate predictions.

The pred function returns a vector of predictions (numeric or factors) from the current model. The arguments are:

The filter function is used to return a logical vector with names for each predictor. The values should be TRUE for predictors that pass the filter and FALSE for those that do not. Inputs are:

The function should return a named local vector, as previously stated.

Examples of these functions are included in the package: caretSBF, lmSBF, rfSBF, treebagSBF, ldaSBF and nbSBF.

Model details about these functions, including examples, are in the package vignette for feature selection.

Value

a list that echos the specified arguments

Author(s)

Max Kuhn

See Also

sbf, caretSBF, lmSBF, rfSBF, treebagSBF, ldaSBF and nbSBF


[Package caret version 4.31 Index]