Learn R Programming

FSinR (version 1.0.8)

selectThreshold: Select threshold

Description

Selects the features whose evaluation is over/under a user given threshold (It depends on the method that generates the evaluation measure. For example: under for regression methods, over for classification methods, etc.). Features that do not satisfy the threshold, will be removed

Usage

selectThreshold(data, class, featureEval, threshold = 0.5)

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

threshold
  • Number between 0 and 1

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 Threshold for iris dataset (filter method)
# Features with a evaluation measure higher than 0.7
selectThreshold(iris, 'Species', mutualInformation, 0.7) 
# }

Run the code above in your browser using DataLab