powered by
Takes the 'k' features with the greatest evaluations
selectKBest(data, class, featureEval, k = 1)
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) of returned features
A list is returned containing:
A vector with all features. Selected features are marked with 1, unselected features are marked with 0
The names of the k returned features sorted according to the result of the evaluation measure
The evaluation measures of the k returned features
# NOT RUN { ## Select K best for iris dataset (filter method) selectKBest(iris, 'Species', roughsetConsistency, 2) # 2 best features # }
Run the code above in your browser using DataLab