Data Mining: Practical Machine Learning Tools and Techniques, Second Edition

(Brent) #1

6.7 BAYESIAN NETWORKS 281


what the tree in Figure 6.22(b) does, because it contains only 8 counts. There
is, for example, no branch that tests humidity =high. How was the tree con-
structed, and how can all counts be obtained from it?
Assume that each attribute in the data has been assigned an index. In the
reduced version of the weather data we give humidityindex 1,windyindex 2,
and playindex 3. An AD tree is generated by expanding each node correspon-
ding to an attribute iwith the values of all attributes that have indices j>i,with
two important restrictions: the most populous expansion for each attribute is
omitted (breaking ties arbitrarily) as are expansions with counts that are zero.
The root node is given index 0, so for it all attributes are expanded, subject to
the same restrictions.


humidity
high
high
high
high
normal
normal
normal
normal

true
true
false
false
true
true
false
false

yes
no
yes
no
yes
no
yes
no

1 2 2 2 2 1 4 0

(a) windy play count


any value
14 instances

windy = true
6 instances

play = no
5 instances

humidity = normal
7 instances

windy = true
3 instances

play = no
1 instance

play = no
3 instances

play = no
1 instance

(b)


Figure 6.22The weather data: (a) reduced version and (b) corresponding AD tree.

Free download pdf