relief | R Documentation |
The algorithm finds weights of continuous and discrete attributes basing on a distance between instances.
relief(formula, data, x, y, neighboursCount = 5, sampleSize = 10)
formula |
An object of class formula with model description. |
data |
A data.frame accompanying formula. |
x |
A data.frame with attributes. |
y |
A vector with response variable. |
neighboursCount |
number of neighbours to find for every sampled instance |
sampleSize |
number of instances to sample |
The function and it's manual page taken directly from FSelector: Piotr Romanski and Lars Kotthoff (2018). FSelector: Selecting Attributes. R package version 0.31. https://CRAN.R-project.org/package=FSelector
a data.frame containing the worth of attributes in the first column and their names as row names
Igor Kononenko: Estimating Attributes: Analysis and Extensions of RELIEF. In: European Conference on Machine Learning, 171-182, 1994.
Marko Robnik-Sikonja, Igor Kononenko: An adaptation of Relief for attribute estimation in regression. In: Fourteenth International Conference on Machine Learning, 296-304, 1997.
data(iris)
weights <- relief(Species~., iris, neighboursCount = 5, sampleSize = 20)
print(weights)
subset <- cut_attrs(weights, 2)
f <- to_formula(subset, "Species")
print(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.