Learn R Programming

daltoolboxdp (version 1.2.737)

fs: Feature Selection

Description

Base constructor for feature selection workflows. It stores the target attribute and provides a simple transform that filters columns to the selected set.

Usage

fs(attribute)

Value

A fs object used as a base for feature selection strategies.

Arguments

attribute

Character. Name of the target variable (predictand).

Details

Concrete strategies such as information gain, Relief, LASSO, and forward stepwise selection are available via fs_ig(), fs_relief(), fs_lasso(), and fs_fss().

Examples

Run this code
if (FALSE) {
# Typical usage pattern:
# 1) Choose a strategy (e.g., fs_ig for information gain)
data(iris)
fs_sel <- daltoolbox::fit(fs_ig("Species"), iris)
fs_sel$features                 # selected feature names

# 2) Apply selection to keep only chosen features + target
iris_small <- daltoolbox::transform(fs_sel, iris)
names(iris_small)
}

Run the code above in your browser using DataLab