Building/Assessing Bayes Net Models
In the lecture notes we saw that in many real work examples it was possible to find conditional independencies/causations that allow us to construct good Bayes Net models.
We can also use our understanding of causation/independence to critique different Bayes net models.
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
1
Building/Assessing Bayes Net Models
Assessing Nets
Two astronomers in di↵erent parts of the world make measurements M1 and M2 of the number of stars N in some small region of the sky, using their telescopes. Normally, there is a small probability e or error of up to one star in each direction. Each telescope can also be badly out of focus with probability f . Let F1 and F2 be boolean variables with Fi = true being that the i-th telesope is out of focus. If the telescope is out of focus then the scientist will always undercount by 3 or more stars (or, if N is 3 or less, fail to detect any stars at all).
F1
M1
F2
M2
F1 N F2 M1
M1 M2
M2
N
N
F1 F2 2
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
Building/Assessing Bayes Net Models
Assessing Nets
Two astronomers in di↵erent parts of the world make measurements M1 and M2 of the number of stars N in some small region of the sky, using their telescopes. Normally, there is a small probability e or error of up to one star in each direction. Each telescope can also be badly out of focus with probability f . Let F1 and F2 be boolean variables with Fi = true being that the i-th telesope is out of focus. If the telescope is out of focus then the scientist will always undercount by 3 or more stars (or, if N is 3 or less, fail to detect any stars at all).
Variables
F1 F2 F1 N F2 M1 M2
N—true number of stars in that region of the sky
M1M2 N
M1 M2
M1 meNasurement made bF1y telFe2 scope one.
(i) (ii) (iii)
M2 measurement made by telescope two
F2 T
i
(a) Which of these Bayesian Networks can correctly representation the preceeding informa-
F1 Telescope one is out of focus
(b) Which is the best network? Explain.
(c) Write out the CPT for Pr(M1|N,F1) for the case where M1 2 {0,1,2,3,4} and N 2
tion? (Note that additional edges in a network do not make the network incorrect, they
only make the network redundant).
e
l
e
}.
in terms of e and f).
2,3
Ex
pre
s
c
ss t
o
p
e
t
w
o
s
out of focus
{1,
(d) Use your CPT for Pr(M1|N,F1) to compute the CPT for Pr(M1|N) (again expressed
he e
ntrie
N, M1, M2 integers >= 0
s in t
(e) Suppose M1 = 1 and M2 = 3. What are the possible numbers of stars. 3. Consider the Bayes Network given below.
erm
s of
e and
f
.
X1
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
3
X2 X3
Building/Assessing Bayes Net Models
Assessing Nets
Two astronomers in di↵erent parts of the world make measurements M1 and M2 of the number of stars N in some small region of the sky, using their telescopes. Normally, there is a small probability e or error of up to one star in each direction. Each telescope can also be badly out of focus with probability f . Let F1 and F2 be boolean variables with Fi = true being that the i-th telesope is out of focus. If the telescope is out of focus then the scientist will always undercount by 3 or more stars (or, if N is 3 or less, fail to detect any stars at all).
Probabilities:
F1 F2 F1 N F2 M1 M2
Each Telescope
M1M2 N
M1 M2
f probability of being out of focus Fi = true
(i) (ii) (iii) If Fi = false,
N F1F2
(a) Which of these Bayesian Networks can correctly representation the preceeding informa-
N – Mi = -1 probability e
tion? (Note that additional edges in a network do not make the network incorrect, they
only make the network redundant).
(b) Which is the best network? Explain.
(c) Write out the CPT for Pr(M1|N,F1) for the case where M1 2 {0,1,2,3,4} and N 2
{1, 2, 3}. Express the entries in terms of e and f .
N – Mi = 1 probability e
(d) Use your CPT for Pr(M1|N,F1) to compute the CPT for Pr(M1|N) (again expressed in terms of e and f).
If Fi = tru
e
(e) Suppose M = 1 and M = 3. What are the possible numbers of stars.
1
N – Mi >= 3 probability 1.
3. Consider the Bayes Network given below.
2
X
1
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
4
X2 X3
telesope is out of focus. If the telescope is out of focus then the scientist will always undercount by 3 or more stars (or, if N is 3 or
Building/Assessing Bayes Net Models
less, fail to detect any stars at all).
F1
F2 F1 N F2 M1
M2
M1 M2
N
M1 M2
N F1F2
(i)
(ii) (iii)
Which of these Bayes Nets can correctly represent
(a) Which of these Bayesian Networks can correctly representation the preceeding informa-
this example?
tion? (Note that additional edges in a network do not make the network incorrect, they only make the network redundant).
(b) Which is the best network? Explain.
(c) Write out the CPT for Pr(M1|N,F1) for the case where M1 2 {0,1,2,3,4} and N 2
{1, 2, 3}. Express the entries in terms of e and f .
Which of the correct Networks is the best
(d) Use your CPT for Pr(M1|N,F1) to compute the CPT for Pr(M1|N) (again expressed representation
in terms of e and f).
(e) Suppose M1 = 1 and M2 = 3. What are the possible numbers of stars.
3. Consider the Bayes Network given below.
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
5
X1
telesope is out of focus. If the telescope is out of focus then the
{}
scientist will always undercount by 3 or more stars (or, if N is 3 or Building/Assessing Bayes Net Models
less, fail to detect any stars at all).
M2
§ Choose ordering of variables such that parents
F1
M1
F2
M2
N
(i)
come before children.
F1 N F2 M1
§ Write chain rule
decomposition of this
N
ordering—know that the
M1 M2
chain rule always produces a correct decomposition.
§ Using our common sense
intuitions ask if this chain rule decomposition can be
decomposition as the Bayes only make the network redundant). net.
(ii)
(iii)
simplified to be the same
(a) Which of these Bayesian Networks can correctly representation the preceeding informa-
tion? (Note that additional edges in a network do not make the network incorrect, they
(b) Which is the best network? Explain.
(c) Write out the CPT for Pr(M1|N,F1) for the case where M1 2 {0,1,2,3,4} and N 2 6
F1 F2
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
1, 2, 3 . Express the entries in terms of e and f.
telesope is out of focus. If the telescope is out of focus then the
{}
scientist will always undercount by 3 or more stars (or, if N is 3 or Building/Assessing Bayes Net Models
less, fail to detect any stars at all).
Chain Rule:
P(F1, F2, M1, M2, N) =
F1
M1
F2
M2
N
(i)
P(N | F1, F2, M1, M2)* P(M2 | F1, F2, M1) *
M2
F1 N F2 M1
P(M1 | F1, F2) *
P(F2 | F1) *
N
P(F1)
M1 M2
Bayes Net decomposition: P(F1, F2, M1, M2, N)) =
F2
(ii)
(iii)
P(N | M1, M2) * P(M2 | F2) *
(a) Which of these Bayesian Networks can correctly representation the preceeding informa-
P(M1 | F1) *
tion? (Note that additional edges in a network do not make the network incorrect, they only make the network redundant).
P(F2) * (b) Which is the best network? ExplPain(.F1)
(c) Write out the CPT for Pr(M1|N,F1) for the case where M1 2 {0,1,2,3,4} and N 2 7
F1
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
1, 2, 3 . Express the entries in terms of e and f.
s. If the telescope is out of focus then the n
a i
w r
||
dercount by 3 or more stars (or, if N is 3 or Building/Assessing Bayes Net Models
stars at all).
Chain Rule:
P(F1, N, F2, M1, M2) =
P(F2 | F1, N) *
N
Bayes Net decomposition:
F1 N F2
M1
M2
(ii)
n Networks can correctly representation the preceeding informa-
onal edges in a network do not make the network incorrect, they
redundant). ork? Explain.
Pr(M1|N,F1) for the case where M1 2 {0,1,2,3,4} and N 2 ntries in terms of e and f.
M1 M2
P(M2 | F1, N, F2, M1)* P(M1 | F1, N, F2) *
P(N | F1) * P(F1)
F1 F2
P(F1, N, F2, M1, M2) =
P(M2 | N, F2)*
P(F2) *
P(N) *
P(F1)
(iii)
P(M1 | F1, N) *
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
8
M1 N,F1) to compute the CPT for Pr(M1 N) (again expressed
out of focus then the
e m
estars(or,ifN is3or Building/Assessing Bayes Net Models
M1
M2
N
F1
F2
(iii)
ntation the preceeding informa- ake the network incorrect, they
Chain Rule:
P(M1, M2,N,F1, F2) =
P(F2 | M1, M2,N,F1)* P(F1 | M1, M2,N) *
P(N | M1, M2) * P(M2 | M1) * P(M1)
Bayes Net decomposition: P(M1, M2,N,F1, F2) =
P(F2 | M2, N)* P(F1 | M1, N) *
P(N | M1, M2) * P(M2| M1) * P(M1)
Fahiem Bacchus, CSC384 Introduction to Artificial Intelligence, University of Toronto,
9