Learn R Programming

FSinR (version 1.0.8)

sbs: Sequential Backward Selection

Description

The SBS method MarillGreen1963FSinR starts with all the features and removes a single feature at each step with a view to improving the evaluation of the set.

Usage

sbs(data, class, featureSetEval, stopCriterion = -1, stop = FALSE)

Arguments

data
  • A data frame with the features and the class of the examples

class
  • The name of the dependent variable

featureSetEval
  • The measure for evaluate features

stopCriterion
  • Define a maximum number of iterations. Disabled if the value is -1 (default: -1 )

stop
  • If true, the function stops if next iteration does not improve current results (default: FALSE)

Value

A list is returned containing:

bestFeatures

A vector with all features. Selected features are marked with 1, unselected features are marked with 0

bestFitness

Evaluation measure obtained with the feature selection

References

Examples

Run this code
# NOT RUN {
## sbs method for iris dataset (filter method)
sbs(iris, 'Species', giniIndex)
# }

Run the code above in your browser using DataLab