Learn R Programming

FSinR (version 1.0.8)

selectDifference: Select difference

Description

Selects features (in descending order from the best evaluation measure to the lowest) until evaluation difference is over a threshold.

Usage

selectDifference(data, class, featureEval, d.threshold = 0.1)

Arguments

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

class
  • The name of the dependent variable

featureEval
  • The measure used to evaluate features

d.threshold
  • Number between 0 and 1, to calculate the slope

Value

A list is returned containing:

bestFeatures

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

featuresSelected

The names of the returned features sorted according to the result of the evaluation measure

valuePerFeature

The evaluation measures of the returned features

Examples

Run this code
# NOT RUN {
## Select Difference for iris dataset (filter method)
# Selects features in descending order as long as the difference between them is less than 0.1
selectDifference(iris, 'Species', chiSquared, 0.1) 
# }

Run the code above in your browser using DataLab