Skip to contents

This function selects features from the input data matrix X using the CATSCORE method and the provided feature selection specification.

Usage

# S3 method for class 'catscore'
select_features(obj, X, Y, ranking.score = c("entropy", "avg", "max"), ...)

Arguments

obj

The feature selection specification created by feature_selector().

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".

Value

A logical vector indicating which features to retain.

Details

The CATSCORE method computes a correlation adjusted t-test for every column in the matrix using sda.ranking from the sda package.

See also

feature_selector for creating a feature selection specification.

Examples

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")
#> Error in UseMethod("select_features"): no applicable method for 'select_features' applied to an object of class "c('catscore', 'feature_selector', 'list')"