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.
leaps::regsubsets
if (requireNamespace("leaps", quietly = TRUE)) { data(iris) fs <- feature_selection_fss("Sepal.Length") fs <- fit(fs, iris) fs$selected iris_fs <- transform(fs, iris) names(iris_fs) }
Run the code above in your browser using DataLab