Professional Documents
Culture Documents
TREES
Intelligent Engineering Algorithms
COE 544
John Geagea
Rami Challita
2
OUTLINE
1. Introduction
2. Background
3. Decision Lists
4. Decision Tree Representation
5. Learning Algorithms
1. ID3 Algorithm
2. ID3 Algorithm Example
6. Overfitting
7. Avoiding Overfitting
8. Pruning
9. Decision Tree Simulation Example
10.Conclusion
3
INTRODUCTION
• Decision Trees are among the most widely used methods for inductive inference.
BACKGROUND
DECISION LISTS
• Cons:
• Can become complex very fast.
• All data used in building the tree should be precise, since a small change can
cause large changes in the tree.
• Data used to build the tree should be up-to-date.
• Hard to build without the aid of a computer.
7
DECISION TREE(DT)
REPRESENTATION (1)
• Classifies instances by sorting them down the tree from the root to a leaf
node.
DECISION TREE(DT)
REPRESENTATION (2)
• k-DT: The depth of a DT is at most k.
• A DT defines a boolean formula: it looks at the paths where the leaf node is
1.
9
DECISION TREE(DT)
REPRESENTATION (3)
10
DECISION TREE(DT)
REPRESENTATION (4)
(Outlook = Sunny) ᴧ (Humidity = Normal)
ᴠ
Outlook = Overcast
ᴠ
(Outlook = Rain) ᴧ (Wind = Weak)
11
LEARNING ALGORITHMS
ID3 ALGORITHM
• Stops when:
• All the instances have the same target attribute value.
• There are no more attributes.
• There are no more instances.
13
ID3 EXAMPLE(2)
15
ID3 EXAMPLE(3)
ID3 EXAMPLE(4)
The Outlook attribute is the root Element having
the largest gain
17
ID3 EXAMPLE(5)
Computing the gains of the attribute Sunny relative to:
• Humidity
• Temperature
• Wind
Adjacent elements
with distinctive
choices
19
OVERFITTING
OVERFITTING
21
AVOIDING OVERFITTING
PRUNING
Means reducing size of larger and deeper trees
Needed to avoid overfiting
• Reduced-Error Pruning
• Post Pruning
23
REDUCED-ERROR PRUNING
• A node is removed if the resulting tree does not harm the prediction outcome.
REDUCED-ERROR PRUNING
25
RULE-POST PRUNING
• Sort the pruned rules by their estimated accuracy and consider them in this
sequence when classifying.
26
CONCLUSION
• The ID3 family of algorithms infers decision trees by growing them from top to
bottom.
DEMO
• http://webdocs.cs.ualberta.ca/~aixplore/learning/DecisionTrees/Applet/De
cisionTreeApplet.html
29
REFERENCES
• T. M. Mitchell, “Decision Tree Learning” in Machine Learning, 1st ed. USA,
1997, ch. 3, pp. 52-78.
• https://people.csail.mit.edu/rivest/Rivest-DecisionLists.pdf
• https://cs.uwaterloo.ca/~mli/dl.ps