feature_selection_fss: Feature selection by forward stepwise search

View source: R/trans_feature_selection_fss.R

feature_selection_fssR Documentation

Feature selection by forward stepwise search

Description

Selects numeric predictors using forward stepwise subset search.

Usage

feature_selection_fss(attribute, features = NULL)

Arguments

attribute

target attribute name

features

optional vector of feature names (default: all columns except attribute)

Details

Adds one predictor at a time (greedy forward selection) and keeps the subset with the highest adjusted R-squared, which penalizes adding predictors that do not pay for their complexity. The target attribute must be numeric.

Implemented with base stats::lm (see references for the method).

Value

returns an object of class feature_selection_fss

References

Hocking, R. R. (1976). The Analysis and Selection of Variables in Linear Regression. Biometrics, 32(1):1-49. Miller, A. (2002). Subset Selection in Regression (2nd ed.). Chapman & Hall/CRC.

Examples

data(mtcars)
fs <- feature_selection_fss("mpg")
fs <- fit(fs, mtcars)
fs$selected
mtcars_fs <- transform(fs, mtcars)
names(mtcars_fs)

daltoolbox documentation built on Nov. 23, 2026, 9:08 a.m.