Decision Trees: Principal Data Miner, ATO Adjunct Associate Professor, ANU
Decision Trees: Principal Data Miner, ATO Adjunct Associate Professor, ANU
Overview
Copyright
c 2006, Graham J. Williams http://togaware.com 1/19/1 Copyright
c 2006, Graham J. Williams http://togaware.com 3/19/2
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
Copyright
c 2006, Graham J. Williams http://togaware.com 4/19/3 Copyright
c 2006, Graham J. Williams http://togaware.com 5/19/4
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
Y N
Copyright
c 2006, Graham J. Williams http://togaware.com 6/19/5 Copyright
c 2006, Graham J. Williams http://togaware.com 7/19/6
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
Output: Decision Tree for Buys Computer Algorithm for Decision Tree Induction
Copyright
c 2006, Graham J. Williams http://togaware.com 10/19/9 Copyright
c 2006, Graham J. Williams http://togaware.com 11/19/10
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
Copyright
c 2006, Graham J. Williams http://togaware.com 12/19/11 Copyright
c 2006, Graham J. Williams http://togaware.com 13/19/12
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
v
0.5
X pi + ni
E (A) = I (pi , ni )
p+n
0.4
i=1
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
node ) , s p l i t , n , l o s s , y v a l , ( y p r o b )
∗ d e n o t e s t e r m i n a l node
Decision Trees
1 ) r o o t 75 47 v i r g i n i c a ( 0 . 2 8 0 0 0 0 0 0 . 3 4 6 6 6 6 7 0 . 3 7 3 3 3 3 3 )
Basics 2 ) P e t a l . Length< 2 . 5 21 0 s e t o s a ( 1 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 ) ∗
3 ) P e t a l . Length >=2.5 54 26 v i r g i n i c a ( 0 . 0 0 0 0 0 0 0 0 . 4 8 1 4 8 1 5 0 . 5 1 8 5 1 8 5 )
Example 6 ) P e t a l . Length< 5 . 0 5 29 3 v e r s i c o l o r ( 0 . 0 0 0 0 0 0 0 0 . 8 9 6 5 5 1 7 0 . 1 0 3 4 4 8 3 ) ∗
7 ) P e t a l . Length >=5.05 25 0 v i r g i n i c a ( 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 1 . 0 0 0 0 0 0 0 ) ∗
Examples
Copyright
c 2006, Graham J. Williams http://togaware.com 16/19/15 Copyright
c 2006, Graham J. Williams http://togaware.com 17/19/16
Introduction Decision Trees Decision Trees in R Introduction Decision Trees Decision Trees in R
4 5
setosa versicolor
24 cases 25 cases
100% 100%
Copyright
c 2006, Graham J. Williams http://togaware.com 18/19/17 Copyright
c 2006, Graham J. Williams http://togaware.com 19/19/18
Rattle 2006−08−21 21:28:13 gjw