View source: R/trans_feature_selection_stepwise.R
| feature_selection_stepwise | R Documentation |
Select features using stepwise search over generalized linear models.
feature_selection_stepwise(
attribute,
features = NULL,
direction = "forward",
family = stats::binomial,
trace = 0
)
attribute |
target attribute name |
features |
optional vector of feature names (default: all columns except |
direction |
stepwise direction: "forward", "backward", or "both" |
family |
glm family passed to |
trace |
level of tracing from |
Supports forward, backward, and both directions via stats::step.
With the default binomial family, the target should represent a binary outcome.
returns an object of class feature_selection_stepwise
data(Boston)
fs <- feature_selection_stepwise("medv", direction = "forward", family = stats::gaussian)
fs <- fit(fs, Boston)
fs$selected
transform(fs, Boston) |> names()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.