We may have certain preferences that determine whether or not we would swim. These can be recorded in a table, as follows:
Swimming suit |
Water temperature |
Swim preference |
None |
Cold |
No |
None |
Warm |
No |
Small |
Cold |
No |
Small |
Warm |
No |
Good |
Cold |
No |
Good |
Warm |
Yes |
Â
The data in this table can alternatively be presented in the following decision tree:
Figure 3.1: Decision tree for the Swim preference example
At the root node, we ask the question—do you have a swimming suit? The response to the question separates the available data into three groups, each with two rows. If the attribute is swimming suit = none, then two rows have the swim preference attribute as no. Therefore, there is no need to ask a question about the temperature of the water...