Loading in 2 Seconds...
Loading in 2 Seconds...
BAYESIAN NETWORKS Ivan Bratko Faculty of Computer and Information Sc. University of Ljubljana. BAYESIAN NETWORKS. Bayesian networks, or belief networks: an approach to handling uncertainty in knowledge-based systems
Faculty of Computer and Information Sc.
University of Ljubljana
sensor that may be triggered by burglar
lightning that may also trigger the sensor
alarm that may be triggered by sensor
call that may be triggered by sensor
if burglary = true
then it is more likely that alarm = true
Bayes network =
belief network =
probabilistic network =
“X has direct influence on Y”
p( B L S A C) = ...
p( ~B L S A C) = ...
p( ~B ~L S A C) = ...
p( ~B L ~S A C) = ...
p(XY) = p(X) p(Y|X), p(Y|X) needed
p(XY) = p(X) p(Y), p(Y|X) not needed!
John calls Mary calls
P(B) = 0.001, P(E) = 0.002
A P(J | A) A P(M | A)
T 0.90 T 0.70
F 0.05 F 0.01
B E P(A | BE)
T T 0.95
T F 0.95
F T 0.29
F F 0.001
If C is known to be true, then prob. of D independent of A, B
p( D | A B C) = p( D | C)
B1 B2 ... parents of C
D1, D2, ... descendants of C
C is independent of C's non-descendants given C's parents
p( C | A1, ..., B1, ..., D1, ...) = p( C | B1, ..., D1, ...)
parent of c b
c e nondescendants of c
descendant of c
By applying rule about nondescendants:
p(c|ab) = p(c|b)
Because: c independent of c's nondesc. a given c's parents (node b)
But, for this Bayesian network:
Athough f is c's nondesc., it cannot be ignored:
knowing f, e becomes more likely;
e may also cause d, so when e becomes more likely, c becomes less likely.
Problem is that descendant d is given.
C is independent of C's nondescendants given
C's parents (only) and not C's descendants.
For each node X with parents Y1, Y2, ..., specify conditional probabilities of form:
p( X | Y1Y2 ...)
for all possible states of Y1, Y2, ...
p( X | Y1, Y2)
p( X | ~Y1, Y2)
p( X | Y1, ~Y2)
p( X | ~Y1, ~Y2)
p(burglary) = 0.001
p(lightning) = 0.02
p(sensor | burglary lightning) = 0.9
p(sensor | burglary ~lightning) = 0.9
p(sensor | ~burglary lightning) = 0.1
p(sensor | ~burglary ~lightning) = 0.001
p(alarm | sensor) = 0.95
p(alarm | ~sensor) = 0.001
p(call | sensor) = 0.9
p(call | ~sensor) = 0.0
10 numbers plus structure of network
are equivalent to
25 - 1= 31 numbers required to specify complete probability distribution (without structure information).
Easy in forward direction, from ancestors to descendents, e.g.:
p( alarm | burglary lightning) = ?
In backward direction, from descendants to ancestors,
apply Bayes' formula
p( B | A) = p(B) * p(A | B) / p(A)
A variant of Bayes' formula to reason about probability of hypothesis H given evidence E in presence of background knowledge B:
1. Probability of conjunction:
p( X1 X2 | Cond) = p( X1 | Cond) * p( X2 | X1 Cond)
2. Probability of a certain event:
p( X | Y1 ... X ...) = 1
3. Probability of impossible event:
p( X | Y1 ... ~X ...) = 0
4. Probability of negation:
p( ~X | Cond) = 1 – p( X | Cond)
If Cond0 = Y Cond where Y is a descendant of X in belief net
then p(X|Cond0) = p(X|Cond) * p(Y|XCond) / p(Y|Cond)
6. Cases when condition Cond does not involve a descendant of X:
(a) If X has no parents then p(X|Cond) = p(X), p(X) given
(b) If X has parents Parents then
In: I. Bratko, Prolog Programming for Artificial Intelligence, Third edition, Pearson Education 2001(Chapter 15)
An interaction with this program:
?- prob( burglary, [call], P).
P = 0.232137
Now we learn there was a heavy storm, so:
?- prob( burglary, [call, lightning], P).
P = 0.00892857
?- prob( burglary, [call,not lightning],P).
P = 0.473934
A path between Vi and Vj is blocked by nodes E if there is a
“blocking node” Vb on the path. Vb blocks the path if one of
the following holds:
Vb is a common cause:
Vb Vb not in E
Vd Vd not in E