compute_fs_results {RAFS}R Documentation

Compute preliminary feature selection results for RAFS

Description

This is a secondary function, useful when experimenting with different feature selection filters and rankings. Its output is used in run_rafs_with_fs_results and it is called for the user in run_rafs.

Usage

compute_fs_results(data, decision, k, seeds, fs_fun = default_fs_fun)

Arguments

data

input data where columns are variables and rows are observations (all numeric)

decision

decision variable as a binary sequence of length equal to number of observations

k

number of folds for internal cross validation

seeds

a vector of seeds used for fold generation for internal cross validation

fs_fun

function to compute feature selection p-values, it must have the same signature as default_fs_fun (which is the default, see its help to learn more)

Value

A list with feature selection results, e.g. from default_fs_fun.

Examples

library(MDFS)
mdfs_omp_set_num_threads(1)  # only to pass CRAN checks
data(madelon)
fs_results <- compute_fs_results(madelon$data, madelon$decision, 2, c(12345))
run_rafs_with_fs_results(madelon$data, madelon$decision, fs_results)

[Package RAFS version 0.2.4 Index]