about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/BNT/examples/static/Models/mk_car_bnet.m
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/bnt-master/BNT/examples/static/Models/mk_car_bnet.m')
-rw-r--r--sourcecodes/bnt-master/BNT/examples/static/Models/mk_car_bnet.m39
1 files changed, 39 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/BNT/examples/static/Models/mk_car_bnet.m b/sourcecodes/bnt-master/BNT/examples/static/Models/mk_car_bnet.m
new file mode 100644
index 00000000..c9a27c9c
--- /dev/null
+++ b/sourcecodes/bnt-master/BNT/examples/static/Models/mk_car_bnet.m
@@ -0,0 +1,39 @@
+function bnet = mk_car_bnet()
+% MK_CAR_BNET Make the car trouble-shooter bayes net.
+%
+% This network is from p13 of "Troubleshooting under uncertainty", Heckerman, Breese and
+% Rommelse, Microsoft Research Tech Report 1994.
+
+
+BatteryAge = 1;
+Battery = 2;
+Starter = 3;
+Lights = 4;
+TurnsOver = 5;
+FuelPump = 6;
+FuelLine = 7;
+FuelSubsys =8;
+Fuel = 9;
+Spark = 10;
+Starts = 11;
+Gauge = 12;
+
+n = 12;
+dag = zeros(n);
+dag(1,2) = 1;
+dag(2,[4 5])=1;
+dag(3,5) = 1;
+dag(6,8) = 1;
+dag(7,8) = 1;
+dag(8,11) = 1;
+dag(9,12) = 1;
+dag(10,11) = 1;
+
+arity = 2;
+ns = arity*ones(1,n);
+bnet = mk_bnet(dag, ns);
+for i=1:n
+  bnet.CPD{i} = tabular_CPD(bnet, i);
+end
+
+