Introduction To Machine Learning: Decision Trees
Introduction To Machine Learning: Decision Trees
Decision Trees
Inas A. Yassine
Systems and Biomedical Engineering Department,
Faculty of Engineering - Cairo University
[email protected]
Decision Tree Representation
D10 D6
D1 D8
D3
D14 D4
D11 D12
D9
D2 D7
D5
D13
D10 D6
D1 D8
D3
D14 D4
D11 D12
D9
D2 D7
D5
D13
Yes
What are the
“best” attributes? Humidity and Wind
Machine Learning Spring 2020 Inas A. Yassine
General Algorithm
• To construct tree T from training set S
• If all examples in S belong to some class in C, or S is sufficiently
"pure", then make a leaf labeled C.
• Otherwise:
• select the “most informative” attribute A
• partition S according to A’s values
• recursively construct sub-trees T1, T2, ..., for the subsets of S
• Weak Learner
• Take labeled data for training
• Generate a hypothesis with a training accuracy greater than 0.5, i.e., < 50%
error over any distribution ; more accurate than random guessing
• Strong learners are very difficult to construct
• Constructing weaker Learners is relatively easy
model 1
Ensemble model
Data model 2
……
model k
• For i = 1 .. M
• Draw a sample of size n*<n from D uniformly and with replacement
• Learn classifier Ci
• Final classifier is a vote of C1 .. CM
• Increases classifier stability/reduces variance