oneR: OneR algorithm

Description Usage Arguments Details Value Author(s) Examples

View source: R/selector.oneR.R

Description

The algorithms find weights of discrete attributes basing on very simple association rules involving only one attribute in condition part.

Usage

1

Arguments

formula

a symbolic description of a model

data

data to process

Details

The algorithm uses OneR classifier to find out the attributes' weights. For each attribute it creates a simple rule based only on that attribute and then calculates its error rate.

Value

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

Author(s)

Piotr Romanski

Examples

1
2
3
4
5
6
7
8
  library(mlbench)
  data(HouseVotes84)
  
  weights <- oneR(Class~., HouseVotes84)
  print(weights)
  subset <- cutoff.k(weights, 5)
  f <- as.simple.formula(subset, "Class")
  print(f)

Example output

OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
    attr_importance
V1       0.25947997
V2       0.09263504
V3       0.60091159
V4       0.77026555
V5       0.55956326
V6       0.29341077
V7       0.37010302
V8       0.50547622
V9       0.47440918
V10      0.08719321
V11      0.24018603
V12      0.56109553
V13      0.39872373
V14      0.47690848
V15      0.38644105
V16      0.30703305
Class ~ V4 + V3 + V12 + V5 + V8
<environment: 0x3f87f48>
Warning message:
system call failed: Cannot allocate memory 

FSelector documentation built on May 17, 2018, 1:04 a.m.