View source: R/feature_selection.R
select_features.catscore | R Documentation |
This function selects features from the input data matrix X using the CATSCORE method and the provided feature selection specification.
## S3 method for class 'catscore'
select_features(obj, X, Y, ranking.score = c("entropy", "avg", "max"), ...)
obj |
The feature selection specification created by |
X |
The input data matrix. |
Y |
The response variable. |
ranking.score |
The feature score to use. Supported scores are "entropy", "avg", or "max". Default is "entropy". |
The CATSCORE method computes a correlation adjusted t-test for every column in the matrix using sda.ranking
from the sda
package.
A logical vector indicating which features to retain.
feature_selector
for creating a feature selection specification.
fsel <- feature_selector("catscore", "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, ranking.score = "entropy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.