Data Mining: Practical Machine Learning Tools and Techniques, Second Edition

(Brent) #1
classes—that is, they are errors made by the rule. Then choose the new term to
maximize the ratio p/t.
An example will help. For a change, we use the contact lens problem of Table
1.1. We will form rules that cover each of the three classes,hard, soft,and none,
in turn. To begin, we seek a rule:
If? then recommendation =hard

For the unknown term ?, we have nine choices:
age = young 2/8
age = pre-presbyopic 1/8
age = presbyopic 1/8
spectacle prescription =myope 3/12
spectacle prescription =hypermetrope 1/12
astigmatism =no 0/12
astigmatism =yes 4/12
tear production rate = reduced 0/12
tear production rate = normal 4/12

The numbers on the right show the fraction of “correct” instances in the set
singled out by that choice. In this case,correctmeans that the recommendation is
hard.For instance,age=youngselects eight instances, two of which recommend
hard contact lenses, so the first fraction is 2/8. (To follow this, you will need to
look back at the contact lens data in Table 1.1 on page 6 and count up the entries
in the table.) We select the largest fraction, 4/12, arbitrarily choosing between
the seventh and the last choice in the preceding list, and create the rule:
If astigmatism = yes then recommendation = hard

This rule is an inaccurate one, getting only 4 instances correct out of the 12
that it covers, shown in Table 4.8. So we refine it further:
If astigmatism = yes and? then recommendation = hard

108 CHAPTER 4| ALGORITHMS: THE BASIC METHODS


Figure 4.7The instance space during operation of a covering algorithm.
Free download pdf