Professional Documents
Culture Documents
PSR 0607 Chap10
PSR 0607 Chap10
PSR 0607 Chap10
Decision Trees
Informal Definition:
Telling things apart
Nominal data
No numeric feature vector
Just a list or properties:
Banana: longish, yellow
Apple: round, medium sized, different colors
like red and green but not blue
Types of questions
(also for continuous data)
10
11
12
13
14
Whats the
corresponding
question and
the resulting
tree?
15
ai xi <
17
Sphere trees
Questions are
d
i =1
( zi xi ) 2 <
18
Nonlinear generalizations
Type of questions:
( x, a ) > 0
With Y some nonlinear function
May be different at each node
Issue: lack of simplicity
19
Impurity of a node
Do all the data at a leaf belong to 1 class?
Example:
At one of the present nodes, the distribution is
70% Grapefruit
20% Lemons
10% Apples
21
Missclassification Impurity
i ( N ) = 1 max PN (i )
j
22
Entropy Impurity
PN (i ) log 2 PN (i )
i( N ) =
j
Very popular
23
Gini Impurity
1
i( N ) =
2
(1 P ( ) )
2
24
25
i ( N ) = i ( N ) PL i ( N L (Q)) (1 PL )i ( N R (Q ))
26
Missclassification Rate
Pruning a CART-tree
(Text Classification)
Example
data for a
two class
problem
30
31
Summary
Decision trees are easy to understand
Decision trees can classify both
categorical and numerical data, but the
output attribute must be categorical
Decision tree algorithms are unstable.
Trees created from numeric data sets
can be quite complex
33