You are on page 1of 1

Tutorial 1: Bayes theorem and Bayesian inference

In lecture 2 we introduced a Bayesian network for recognising cats in pictures:


Variable Interpretation Type Value
C Cat Discrete (2 states) True or False
E Eyes Discrete (3 states) Probable, Possible, Unlikely
S Eye separation Continuous S = (S
i
2 (R
l
+ R
r
))/R
r
D Eye difference Continuous |(R
l
R
r
)/R
r
|
F Fur colour Discrete (20 states) Histogram of pixel hues
We then choose a method of quantisation of the variable S into seven states as follows:
[below 1.5][1.5 0.75][0.75 0.25][0.25 0.25][0.25 0.75][0.75 1.5][above1.5]
1. Suggest a way of quantising the variable the variable D into four states.
2. Given the following data set, calculate the prior probability P(C) and the link matrices P(D|E) and
P(E|C) in the same format as that given for P(S|E) and P(F|C) (NB The states of D are labeled
d
1
, d
2
, d
3
, d
4
etc).
c
1
e
1
s
2
d
1
f
5
c
1
e
1
s
2
d
2
f
6
c
2
e
1
s
3
d
2
f
4
c
1
e
1
s
2
d
3
f
3
c
1
e
1
s
3
d
1
f
4
c
2
e
2
s
1
d
1
f
7
c
1
e
2
s
3
d
2
f
10
c
1
e
2
s
4
d
3
f
4
c
1
e
3
s
5
d
1
f
8
c
2
e
3
s
4
d
2
f
3
c
2
e
3
s
6
d
3
f
1
c
1
e
3
s
7
d
1
f
2
c
2
e
3
s
1
d
4
f
9
c
2
e
3
s
2
d
4
f
8
c
2
e
3
s
7
d
4
f
1
P(S|E) =

P(s
1
|e
1
) P(s
1
|e
2
) P(s
1
|e
3
)
P(s
2
|e
1
) P(s
2
|e
2
) P(s
2
|e
3
)
P(s
3
|e
1
) P(s
3
|e
2
) P(s
3
|e
3
)
P(s
4
|e
1
) P(s
4
|e
2
) P(s
4
|e
3
)
P(s
5
|e
1
) P(s
5
|e
2
) P(s
5
|e
3
)
P(s
6
|e
1
) P(s
6
|e
2
) P(s
6
|e
3
)
P(s
7
|e
1
) P(s
7
|e
2
) P(s
7
|e
3
)

0 0.33 0.14
0.6 0 0.14
0.4 0.34 0
0 0.33 0.14
0 0 0.14
0 0 0.14
0 0 0.28

P(F|C) =

P(f
1
|c
1
) P(f
1
|c
2
)
P(f
2
|c
1
) P(f
2
|c
2
)
P(f
3
|c
1
) P(f
3
|c
2
)
P(f
4
|c
1
) P(f
4
|c
2
)
P(f
5
|c
1
) P(f
5
|c
2
)
P(f
6
|c
1
) P(f
6
|c
2
)
P(f
7
|c
1
) P(f
7
|c
2
)
P(f
8
|c
1
) P(f
8
|c
2
)
P(f
9
|c
1
) P(f
9
|c
2
)
P(f
10
|c
1
) P(f
10
|c
2
)

0 0.3
0.125 0
0.125 0.14
0.25 0.14
0.125 0
0.125 0
0 0.14
0.125 0.14
0 0.14
0.125 0

3. Given your answer to 2 and that for a particular picture S = s


4
, D = d
2
and F = f
3
calculate the
probability of there being a cat in the picture. (First calculate the likelihood of E).
DOC493: Intelligent Data Analysis and Probabilistic Inference Tutorial 1 1

You might also like