Contact lenses: An idealized problem
The contact lens data introduced earlier tells you the kind of contact lens to pre-
scribe, given certain information about a patient. Note that this example is
intended for illustration only: it grossly oversimplifies the problem and should
certainly not be used for diagnostic purposes!
The first column of Table 1.1 gives the age of the patient. In case you’re won-
dering,presbyopiais a form of longsightedness that accompanies the onset of
middle age. The second gives the spectacle prescription:myopemeans short-
sighted and hypermetropemeans longsighted. The third shows whether the
patient is astigmatic, and the fourth relates to the rate of tear production, which
is important in this context because tears lubricate contact lenses. The final
column shows which kind of lenses to prescribe:hard, soft,or none.All possi-
ble combinations of the attribute values are represented in the table.
A sample set of rules learned from this information is shown in Figure 1.1.
This is a rather large set of rules, but they do correctly classify all the examples.
These rules are complete and deterministic: they give a unique prescription for
every conceivable example. Generally, this is not the case. Sometimes there are
situations in which no rule applies; other times more than one rule may apply,
resulting in conflicting recommendations. Sometimes probabilities or weights
1.2 SIMPLE EXAMPLES: THE WEATHER PROBLEM AND OTHERS 13
If tear production rate = reduced then recommendation = none
If age = young and astigmatic = no and
tear production rate = normal then recommendation = soft
If age = pre-presbyopic and astigmatic = no and
tear production rate = normal then recommendation = soft
If age = presbyopic and spectacle prescription = myope and
astigmatic = no then recommendation = none
If spectacle prescription = hypermetrope and astigmatic = no and
tear production rate = normal then recommendation = soft
If spectacle prescription = myope and astigmatic = yes and
tear production rate = normal then recommendation = hard
If age = young and astigmatic = yes and
tear production rate = normal then recommendation = hard
If age = pre-presbyopic and
spectacle prescription = hypermetrope and astigmatic = yes
then recommendation = none
If age = presbyopic and spectacle prescription = hypermetrope
and astigmatic = yes then recommendation = none
Figure 1.1Rules for the contact lens data.