Decision trees
A decision tree is a tree structure that is used like a flow-chart. Each internal node contains a true-false classification question, with its two branches corresponding to the answers True and False. Each leaf node is labeled with the consequent classification label. The paths from the root to the leaves represent classification rules.
The purpose of the decision tree is to provide a dynamic sequence of questions, whose answers will lead to a single decision. This is one type of classification algorithm. The target attribute is the set of all possible decisions that label the leaves of the tree.
The Binary Search algorithm is essentially a decision tree. It is used, for example, for looking up a name in a long, alphabetized list of names, such as a phone book or a contacts list. The process begins at the middle of the list and then branches repeatedly according to how the target name compares to the name in the current node of the tree.
This is illustrated in Figure 7-2: