How to Use a Decision Tree? (Cont.)
Based on the rules or decision tree, the classification is straightforward.
- Alex is willing to pay standard travel cost per km, thus regardless his other attributes, his transportation mode must be train.
- Buddy is only willing to pay cheap travel cost per km, and his gender is male, thus his selection of transportation mode should be bus.
- Cherry is also willing to pay cheap travel cost per km, and her gender is female and she owns a car, thus her transportation mode choice is train.
Person Name |
Travel Cost ($)/km |
Gender |
Car Ownership |
Transportation Mode |
Alex |
Standard |
Male |
1 |
Train |
Buddy |
Cheap |
Male |
0 |
Bus |
Cherry |
Cheap |
Female |
1 |
Train |
Variable “Income level” never be utilized to classify the transportation mode in this case.
The sequence of rules generated by the decision tree is based on priority of the attributes, e.g.,
|
|
|
- There is no rule for people who own more than 1 car because based on the data it is already covered by attribute travel cost/km.
- For those who own 2 cars the travel cost/km are always expensive, thus the mode is car.
Due to the limitation of decision algorithm (most algorithms of decision tree employ greedy strategy with no backtracking thus it is not exhaustive search), these sequences of priority in general is not optimum.
We cannot say that the rules generated by decision tree are the best rules.