Learn R Programming

FSinR (version 1.0.8)

sfs: Sequential Forward Selection

Description

The SFS method Whitney1971FSinR starts with an empty set of features and add a single feature at each step with a view to improving the evaluation of the set.

Usage

sfs(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 {
## sfs method for iris dataset (filter method)
sfs(iris, 'Species', roughsetConsistency)
# }

Run the code above in your browser using DataLab