View source: R/feature_selection.R
select_features.FTest | R Documentation |
This function selects features from the input data matrix X using the F-test method and the provided feature selection specification.
## S3 method for class 'FTest'
select_features(obj, X, Y, ...)
obj |
The feature selection specification created by |
X |
The input data matrix. |
Y |
The response variable. |
... |
extra args (not used) |
The F-test method computes a one-way ANOVA for every column in the feature matrix.
A logical vector indicating which features to retain.
feature_selector
for creating a feature selection specification.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.