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

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 #|
Daniel@0 2 The following code represents the burglar alarm Bayes network from
Daniel@0 3 Chapter 14 of Russell & Norvig, 2nd Edition. This network representation
Daniel@0 4 is used in the corresponding Bayes net code found in this directory.
Daniel@0 5
Daniel@0 6 The conditional probability tables consist of the values listed here
Daniel@0 7 (along with the probabilities of the corresponding complementary events):
Daniel@0 8
Daniel@0 9 P(Burglary = true) = 0.001 (=> P(Burglary = false) = 0.999)
Daniel@0 10 P(Earthquake = true) = 0.002 (=> P(Earthquake = false) = 0.998)
Daniel@0 11
Daniel@0 12 P(Alarm = true | Burglary = true, Earthquake = true) = 0.95
Daniel@0 13 P(Alarm = true | Burglary = true, Earthquake = false) = 0.94
Daniel@0 14 P(Alarm = true | Burglary = false, Earthquake = true) = 0.29
Daniel@0 15 P(Alarm = true | Burglary = false, Earthquake = false) = 0.001
Daniel@0 16
Daniel@0 17 P(JohnCalls = true | Alarm = true) = 0.90
Daniel@0 18 P(JohnCalls = true | Alarm = false) = 0.05
Daniel@0 19
Daniel@0 20 P(MaryCalls = true | Alarm = true) = 0.70
Daniel@0 21 P(MaryCalls = true | Alarm = false) = 0.01
Daniel@0 22 |#
Daniel@0 23
Daniel@0 24 (setf *burglar-alarm-net*
Daniel@0 25 '((MaryCalls (true false)
Daniel@0 26 (Alarm)
Daniel@0 27 ((true) 0.70 0.30)
Daniel@0 28 ((false) 0.01 0.99))
Daniel@0 29 (JohnCalls (true false)
Daniel@0 30 (Alarm)
Daniel@0 31 ((true) 0.90 0.10)
Daniel@0 32 ((false) 0.05 0.95))
Daniel@0 33 (Alarm (true false)
Daniel@0 34 (Burglary Earthquake)
Daniel@0 35 ((true true) 0.95 0.05)
Daniel@0 36 ((true false) 0.94 0.06)
Daniel@0 37 ((false true) 0.29 0.71)
Daniel@0 38 ((false false) 0.001 0.999))
Daniel@0 39 (Burglary (true false)
Daniel@0 40 ()
Daniel@0 41 (0.001 0.999))
Daniel@0 42 (Earthquake (true false)
Daniel@0 43 ()
Daniel@0 44 (0.002 0.998))
Daniel@0 45 ))