Map > Data Mining > Predicting the Future > Modeling > Classification > OneR  
OneR 

OneR, short for "One Rule", is a simple, yet accurate, classification algorithm that generates one rule for each predictor in the data, then selects the rule with the smallest total error as its "one rule". To create a rule for a predictor, we construct a frequency table for each predictor against the target. It has been shown that OneR produces rules only slightly less accurate than stateoftheart classification algorithms while producing rules that are simple for humans to interpret.  
OneR Algorithm  
For each predictor, For each value of that predictor, make a rule as follows; Count how often each value of target (class) appears Find the most frequent class Make the rule assign that class to this value of the predictor Calculate the total error of the rules of each predictor Choose the predictor with the smallest total error. 

Example:  
Finding the best predictor with the smallest total error using OneR algorithm based on related frequency tables.  
The best predictor is:  
Predictors Contribution 

Simply, the total error calculated from the frequency tables is the measure of each predictor contribution. A low total error means a higher contribution to the predictability of the model. 



Model Evaluation 

The following confusion matrix shows significant predictability power. OneR does not generate score or probability, which means evaluation charts (Gain, Lift, KS and ROC) are not applicable. 







Try to invent a new OneR algorithm by using ANOVA and Chi^{2} test.  