swh:1:snp:0f920b1e114986636ba2e45b5c1a83473fb6cf12
Raw File
Tip revision: 3e594f8fd8b56d6c609b1857ad9b41d057235295 authored by Lars Kotthoff on 16 February 2021, 17:20:03 UTC
version 0.33
Tip revision: 3e594f8
oneR.Rd
\name{oneR}
\alias{oneR}
\title{ 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{
  \item{formula}{ a symbolic description of a model }
  \item{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{ Piotr Romanski }
\examples{
  library(mlbench)
  data(HouseVotes84)
  
  weights <- oneR(Class~., HouseVotes84)
  print(weights)
  subset <- cutoff.k(weights, 5)
  f <- as.simple.formula(subset, "Class")
  print(f)
}
back to top