annotate toolboxes/FullBNT-1.0.7/bnt/examples/static/burglar-alarm-net.lisp.txt @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 #|
wolffd@0 2 The following code represents the burglar alarm Bayes network from
wolffd@0 3 Chapter 14 of Russell & Norvig, 2nd Edition. This network representation
wolffd@0 4 is used in the corresponding Bayes net code found in this directory.
wolffd@0 5
wolffd@0 6 The conditional probability tables consist of the values listed here
wolffd@0 7 (along with the probabilities of the corresponding complementary events):
wolffd@0 8
wolffd@0 9 P(Burglary = true) = 0.001 (=> P(Burglary = false) = 0.999)
wolffd@0 10 P(Earthquake = true) = 0.002 (=> P(Earthquake = false) = 0.998)
wolffd@0 11
wolffd@0 12 P(Alarm = true | Burglary = true, Earthquake = true) = 0.95
wolffd@0 13 P(Alarm = true | Burglary = true, Earthquake = false) = 0.94
wolffd@0 14 P(Alarm = true | Burglary = false, Earthquake = true) = 0.29
wolffd@0 15 P(Alarm = true | Burglary = false, Earthquake = false) = 0.001
wolffd@0 16
wolffd@0 17 P(JohnCalls = true | Alarm = true) = 0.90
wolffd@0 18 P(JohnCalls = true | Alarm = false) = 0.05
wolffd@0 19
wolffd@0 20 P(MaryCalls = true | Alarm = true) = 0.70
wolffd@0 21 P(MaryCalls = true | Alarm = false) = 0.01
wolffd@0 22 |#
wolffd@0 23
wolffd@0 24 (setf *burglar-alarm-net*
wolffd@0 25 '((MaryCalls (true false)
wolffd@0 26 (Alarm)
wolffd@0 27 ((true) 0.70 0.30)
wolffd@0 28 ((false) 0.01 0.99))
wolffd@0 29 (JohnCalls (true false)
wolffd@0 30 (Alarm)
wolffd@0 31 ((true) 0.90 0.10)
wolffd@0 32 ((false) 0.05 0.95))
wolffd@0 33 (Alarm (true false)
wolffd@0 34 (Burglary Earthquake)
wolffd@0 35 ((true true) 0.95 0.05)
wolffd@0 36 ((true false) 0.94 0.06)
wolffd@0 37 ((false true) 0.29 0.71)
wolffd@0 38 ((false false) 0.001 0.999))
wolffd@0 39 (Burglary (true false)
wolffd@0 40 ()
wolffd@0 41 (0.001 0.999))
wolffd@0 42 (Earthquake (true false)
wolffd@0 43 ()
wolffd@0 44 (0.002 0.998))
wolffd@0 45 ))