powered by
Selects numeric predictors using forward stepwise subset search.
feature_selection_fss(attribute, features = NULL)
returns an object of class feature_selection_fss
feature_selection_fss
target attribute name
optional vector of feature names (default: all columns except attribute)
attribute
Uses leaps::regsubsets and keeps the subset with the highest adjusted R-squared. The target attribute must be numeric.
leaps::regsubsets
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) }
Run the code above in your browser using DataLab