powered by
Selects a fraction, given as a percentage, of the total number of available features
selectPercentile(data, class, featureEval, percentile = 10)
A data frame with the features and the class of the examples
The name of the dependent variable
The measure used to evaluate features
Number (positive integer) between 0 and 100
A vector with all features. Selected features are marked with 1, unselected features are marked with 0
The names of the returned features sorted according to the result of the evaluation measure
The evaluation measures of the returned features
# 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