How to Use a Decision Tree?


Decision tree can be used to predict a pattern or to classify the class of a data. Suppose we have new unseen records of persons. The following data are called test data (in contrast to training data of previous slide) because we would like to examine the classes of these data.

Person Name Gender Car Ownership Travel Cost ($)/km Income Level Transportation Mode
Alex Male 1 Standard High ?
Buddy Male 0 Cheap Medium ?
Cherry Female 1 Cheap High ?

The question is what transportation mode would Alex, Buddy and Cherry use? Using the decision tree that we have generated, we will use deductive approach to classify whether a person will use car, train or bus as his or her mode along a major route in that city, based on the given attributes.

Start from the root node “Travel cost per km,” the rules are mutually exclusive and exhaustive for each class label on the leaf node of the tree:



      Snake 1: Are we poisonous?    
      Snake 2: I don’t know, why?    
      Snake 1: I just bit my lip.