This method traverses all rules in the rule base. Each rule that fits
the object to be classified, gives a vote to
its decision, weighted by its validity. The decision with the most
votes is chosen. The algorithm is shown in
Figure
. The algorithm works by going through all
rules for each object. If a rule match the current object, that rule's
decision is given a vote equal to its accuracy. When all rules have
been considered, the classification with highest sum of the votes is returned.
Figure: Pseudo-code for an algorithm which uses accuracy for voting.
Another possibility than to use the validity as the vote, is to also take into account the number of objects matching the rule. This could be done by the means of the weight of evidence measure discussed earlier in this chapter. In the algorithm, only the calculation of Measure will change.
When using simple voting, two rules with accuracy of 50% will be preferred to one with accuracy 99%. This is probably not wanted. We therefore suggest to apply the following function to the accuracy and use the result for voting:
This function has a range from 0 to 1 since the accuracies vary
between 0 and 1, but will give low accuracies less weight than higher
ones. Another possibility which gives the same effect, but to another
degree is to square the accuracy, or take the power. Using
the exponential and squaring function is shown in
Figure
.
Figure: Applying a function to the accuracy.