One-attribute-rule

One-attribute-rule

The one-attribute-rule, or OneR, is an algorithm for finding association rules. According to Ross, very simple association rules, involving just one attribute in the condition part, often work well in practice with real-world data. The idea of the OneR (one-attribute-rule) algorithm is to find the one attribute to use to classify a novel datapoint that makes fewest prediction errors.

For example, to classify a car you haven't seen before, you might apply the following rule: If Fast Then Sportscar

As opposed to a rule with multiple attributes in the condition: If Fast And Softtop And Red Then Sportscar.

The algorithm is as follows:

For each attribute A:    For each value V of that attribute, create a rule: 1. count how often each class appears 2. find the most frequent class, c      3. make a rule "if A=V then C=c" Calculate the error rate of this rule

Pick the attribute whose rules produce the lowest error rate

References http://www.dcs.napier.ac.uk/~peter/vldb/dm/node8.html