View source: R/trans_feature_selection_relief.R
| feature_selection_relief | R Documentation |
Rank and select features using a simplified RELIEF algorithm.
feature_selection_relief(
attribute,
features = NULL,
top = NULL,
cutoff = NULL,
m = 50
)
attribute |
target attribute name |
features |
optional vector of feature names (default: all columns except |
top |
optional number of top features to keep |
cutoff |
optional minimum RELIEF weight to keep a feature |
m |
number of sampled instances for RELIEF updates |
For each sampled instance, the algorithm compares nearest hit/miss neighbors and updates feature weights.
returns an object of class feature_selection_relief
data(iris)
fg <- feature_generation(
IsVersicolor = ifelse(Species == "versicolor", "versicolor", "not_versicolor")
)
iris_bin <- transform(fg, iris)
iris_bin$IsVersicolor <- factor(iris_bin$IsVersicolor)
fs <- feature_selection_relief("IsVersicolor", top = 2, m = 50)
fs <- fit(fs, iris_bin)
fs$selected
transform(fs, iris_bin) |> names()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.