Basic Algorithm
Recall, a node in the tree represents a conjunction of attribute values. We will try to build “the shortest possible” tree that classifies all the training examples correctly. In the algorithm we also store the list of attributes we have not used so far for classification.
Initialization: tree ? {} attributes ? {all attributes} examples ? {all training examples}
Recursion:
- Choose a new attribute A with possible values {ai}
- For each ai, add a subtree formed by recursively building the tree with
- the current node as root
- all attributes except A
- all examples where A=ai