6.7 BAYESIAN NETWORKS 273
outlook;the right gives a probability for each value oftemperature. For example,
the first number (0.143) is the probability oftemperaturetaking on the value
hot,given that playand outlookhave values yesand sunny,respectively.
How are the tables used to predict the probability of each class value for a
given instance? This turns out to be very easy, because we are assuming that
there are no missing values. The instance specifies a value for each attribute. For
each node in the network, look up the probability of the node’s attribute value
based on the row determined by its parents’ attribute values. Then just multi-
ply all these probabilities together.
playplay
yes
.633no
.367outlookplayyes
nooutlook
sunny
.238
.538overcast
.429
.077rainy
.333
.385temperatureplayyes
notemperature
hot
.238
.385mild
.429
.385cool
.333
.231windyplayyes
nowindy
false
.350
.583true
.650
.417humidityplayyes
nohumidity
high
.350
.750normal
.650
.250Figure 6.20A simple Bayesian network for the weather data.