powered by
Select features using stepwise search over generalized linear models.
feature_selection_stepwise( attribute, features = NULL, direction = "forward", family = stats::binomial, trace = 0 )
returns an object of class feature_selection_stepwise
feature_selection_stepwise
target attribute name
optional vector of feature names (default: all columns except attribute)
attribute
stepwise direction: "forward", "backward", or "both"
glm family passed to stats::glm (default: binomial)
stats::glm
binomial
level of tracing from stats::step
stats::step
Supports forward, backward, and both directions via stats::step. With the default binomial family, the target should represent a binary outcome.
data(Boston) fs <- feature_selection_stepwise("medv", direction = "forward", family = stats::gaussian) fs <- fit(fs, Boston) fs$selected transform(fs, Boston) |> names()
Run the code above in your browser using DataLab