Learn R Programming

FSinR (version 1.0.8)

selectPercentile: Select Percentile

Description

Selects a fraction, given as a percentage, of the total number of available features

Usage

selectPercentile(data, class, featureEval, percentile = 10)

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

percentile
  • Number (positive integer) between 0 and 100

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 Percentile for iris dataset (filter method)
selectPercentile(iris, 'Species', giniIndex, 80) # 80% best features
# }

Run the code above in your browser using DataLab