We have the following data about the shopping preferences of our friend, Jane:
Temperature |
Rain |
Shopping |
Cold |
None |
Yes |
Warm |
None |
No |
Cold |
Strong |
Yes |
Cold |
None |
No |
Warm |
Strong |
No |
Warm |
None |
Yes |
Cold |
None |
? |
We would like to find out, using the decision trees, whether Jane would go shopping if the outside temperature was cold with no rain.
Analysis:
Here we should be careful, as there are instances of the data that have the same values for the same attributes, but have different classes; that is, (cold,none,yes) and (cold,none,no). The program we made would form the following decision tree:
Root ├── [Temperature=Cold] │ ├──[Rain=None] │ │ └──[Shopping=Yes] ...