FSelector (version 0.21)

oneR: OneR algorithm

Description

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

Usage

oneR(formula, data)

Arguments

formula

a symbolic description of a model

data

data to process

Value

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

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.

Examples

Run this code
# NOT RUN {
  library(mlbench)
  data(HouseVotes84)
  
  weights <- oneR(Class~., HouseVotes84)
  print(weights)
  subset <- cutoff.k(weights, 5)
  f <- as.simple.formula(subset, "Class")
  print(f)
# }

Run the code above in your browser using DataLab