


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Out: Fri Feb 23 Due: Fri Mar 02
In this problem, you will derive recursion relations for real-time updating of beliefs based on incoming evidence. These relations are useful for situated agents that must monitor their environments in real-time.
(a) Consider the discrete hidden Markov model (HMM) with hidden states St, observations Ot, transition matrix aij and emission matrix bik. Let
qit = P (St = i|o 1 , o 2 ,... , ot)
denote the conditional probability that St is in the ith^ state of the HMM based on the evidence up to and including time t. Derive the recursion relation:
qjt =
Zt bj (ot)
∑
i
aij qit− 1 where Zt =
∑
ij
bj (ot)aij qit− 1.
Justify each step in your derivation—for example, by appealing to Bayes rule or properties of condi- tional independence. (b) Consider the dynamical system with continuous, real-valued hidden states Xt and observations Yt, represented by the belief network shown below. By analogy to the previous problem (replacing sums by integrals), derive the recursion relation:
P (xt|y 1 , y 2 ,... , yt) =
Zt
P (yt|xt)
∫ dxt− 1 P (xt|xt− 1 ) P (xt− 1 |y 1 , y 2 ,... , yt− 1 ),
where Zt is the appropriate normalization factor,
Zt =
∫ dxt P (yt|xt)
∫ dxt− 1 P (xt|xt− 1 ) P (xt− 1 |y 1 , y 2 ,... , yt− 1 ).
In principle, an agent could use this recursion for real-time updating of beliefs in arbitrarily compli- cated continuous worlds. In practice, why is this difficult for all but Gaussian random variables?
X 1 X 2 X 3 X 4
Y 1 Y 2 Y 3 Y 4
Consider a discrete HMM with hidden states St, observations Ot, transition matrix aij = P (St+1 = j|St = i) and emission matrix bik = P (Ot = k|St = i). In class, we defined the quantities:
αit = P (o 1 , o 2 ,... , ot, St = i), βit = P (ot+1, ot+2,... , oT |St = i),
for a particular observation sequence {o 1 , o 2 ,... , oT } of length T. Show that the likelihood can in fact be computed from the αβ-values at any time t, using the formula:
P (o 1 , o 2 ,... , oT ) =
∑
ij
αitaij bj (ot+1)βjt+1.
Consider a discrete HMM with hidden states St ∈ { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 }, binary observations Ot ∈ { 0 , 1 }, and the following parameters for its initial state distribution, transition matrix, and emission matrix:
P (S 1 = i) =
for all i,
P (St+1 = j|St = i) =
{
P (Ot = 1|St = i) =
i 10
Download the ASCII file hmm.dat from the course web site, which contains a bit sequence {o 1 , o 2 ,... , oT } of T = 10000 observations. Use the Viterbi algorithm to compute the most likely sequence of hidden states conditioned on this particular sequence of observations. Turn in a print-out of your source code, as well as a plot of the most likely sequence of hidden states versus time. (The correct answer will reveal a highly recognizable mathematical sequence.) You may program in the language of your choice.
Consider a multivariate Gaussian mixture model with two mixture components. The model has a hidden binary variable y ∈ { 0 , 1 } and an observed vector variable ~x ∈ Rd, with graphical model:
y x
P (y = i) = πi P (~x|y = i) = (2π)−^
d 2 |Σi|−^
(^12) e−^
(^12) (~x−μ~i)T (^) Σ− i 1 (~x−~μi)
The parameters of the Gaussian mixture model are thus the prior probabilities π 0 and π 1 , the mean vectors ~μ 0 and ~μ 1 , and the covariance matrices Σ 0 and Σ 1.
(a) Compute the posterior distribution P (y = 1|~x) as a function of the parameters (π 0 , π 1 , ~μ 0 , ~μ 1 , Σ 0 , Σ 1 ) of the Gaussian mixture model.
(b) Consider the special case of this model where the two mixture components share the same covariance matrix: namely, Σ 0 = Σ 1 = Σ. In this case, show that your answer from part (a) can be written as:
P (y = 1|~x) = σ( w~ · ~x + b) where σ(z) =
1 + e−z^
As part of your answer, you should express the parameters ( w, b~ ) of the sigmoid function explicitly in terms of the parameters (π 0 , π 1 , ~μ 0 , ~μ 1 , Σ) of the Gaussian mixture model.