View source: R/trans_feature_selection_fss.R
| feature_selection_fss | R Documentation |
Selects numeric predictors using forward stepwise subset search.
feature_selection_fss(attribute, features = NULL)
attribute |
target attribute name |
features |
optional vector of feature names (default: all columns except |
Uses leaps::regsubsets and keeps the subset with the highest adjusted R-squared.
The target attribute must be numeric.
returns an object of class feature_selection_fss
if (requireNamespace("leaps", quietly = TRUE)) {
data(Boston)
fs <- feature_selection_fss("medv")
fs <- fit(fs, Boston)
fs$selected
boston_fs <- transform(fs, Boston)
names(boston_fs)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.