Perform feature selection using the F-test method
select_features.FTest.Rd
This function selects features from the input data matrix X using the F-test method and the provided feature selection specification.
Usage
# S3 method for FTest
select_features(obj, X, Y, ...)
Arguments
- obj
The feature selection specification created by
feature_selector()
.- X
The input data matrix.
- Y
The response variable.
- ...
extra args (not used)
See also
feature_selector
for creating a feature selection specification.
Examples
fsel <- feature_selector("FTest", "top_k", 1000)
X <- as.data.frame(matrix(rnorm(100 * 10), 100, 10))
Y <- rep(letters[1:5], 20)
selected_features <- select_features(fsel, X, Y)
#> selecting features via FTest
#> cutoff type top_k
#> cutoff value 1000
#> Warning: NAs introduced by coercion
#> Warning: missing values for 'group'
#> retaining 10 features in matrix with 10 columns