relief: RReliefF filter

Description Usage Arguments Details Value Author(s) References Examples

Description

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

Usage

1
relief(formula, data, neighbours.count = 5, sample.size = 10)

Arguments

formula

a symbolic description of a model

data

data to process

neighbours.count

number of neighbours to find for every sampled instance

sample.size

number of instances to sample

Details

The algorithm samples instances and finds their nearest hits and misses. Considering that result, it evaluates weights of attributes.

Value

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

Author(s)

Piotr Romanski

References

Examples

1
2
3
4
5
6
7
  data(iris)
  
  weights <- relief(Species~., iris, neighbours.count = 5, sample.size = 20)
  print(weights)
  subset <- cutoff.k(weights, 2)
  f <- as.simple.formula(subset, "Species")
  print(f)

Example output

OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
             attr_importance
Sepal.Length       0.1569444
Sepal.Width        0.1075000
Petal.Length       0.3052542
Petal.Width        0.3047917
Species ~ Petal.Length + Petal.Width
<environment: 0x3fd2ff0>
Warning message:
system call failed: Cannot allocate memory 

FSelector documentation built on May 2, 2019, 4:52 p.m.