relief: RReliefF filter

Description Usage Arguments Details Value References Examples

View source: R/relief.R

Description

The algorithm finds weights of continuous and discrete attributes basing on a distance between instances.

Usage

1
relief(formula, data, x, y, neighboursCount = 5, sampleSize = 10)

Arguments

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

Details

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

Value

a data.frame containing the worth of attributes in the first column and their names as row names

References

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.

Examples

1
2
3
4
5
6
7
data(iris)

weights <- relief(Species~., iris, neighboursCount = 5, sampleSize = 20)
print(weights)
subset <- cut_attrs(weights, 2)
f <- to_formula(subset, "Species")
print(f)

FSelectorRcpp documentation built on Jan. 16, 2021, 5:06 p.m.