Write down the probability tables for robot pet


For this exercise, you will be implementing an
HMM for a robot pet, which is designed to play with or entertain its owner when it thinks the owner is sad, and remain unobtrusive when the owner is happy. Of course, the robot cannot directly access the human's internal state, but it can observe his or her action

For the sake of this exercise, humans have two hidden states: happy (H) and sad (S), which the robot will need to deduce from ve actions: cooking (CO), crying (CR), sleeping (SL), socializing (SO), and watching TV (W).
From a series of experiments, the robot designers have determined that as people move from one task to another, sad people remain sad 80% of the time and happy people remain happy 90% of the time (the remainder of the time they switch from sad to happy or happy to sad). Initially, 60% of people are happy. That is, P(x0 = H) = 0:6.
The designers have also determined that for happy and sad people, the activity breakdown is as follows:
S H
CO 10% 30%
CR 20% 0%
SL 40% 30%
SO 0% 30%
W 30% 10%
Let  = p(x_t|x_t-1) and phi = p(y_t|x_t) denote the transition and observation probability tables respectively. Implement a Python function that allows you to do inference ( ltering) and prediction for a given , , p(x0) and y for T time steps.

Your function should look something like this:

def HMM(px0, theta, phi, y, T):
??? (setup) ???
for t in xrange(T):
if t < len(y):
???
else:
???
return px

(i) Filtering: Write down the probability tables for p(xtjxtô€€€1) and p(ytjxt).
(ii) Filtering: If at time tô€€€1 we have p(xtô€€€1 = Hjy1:tô€€€1) = 1, what are the values of p(xt = Hjy1:tô€€€1)
and p(xt = Hjy1:tô€€€1; yt = W)?

(i) Filtering:
For the sequence of observations y1:5 = fSO; SO;CO;W; SLg, what are the predictions of the user's internal state at each time step? In other words, what is the ltering distribution p(xtjy1:t) for t =1; 2; 3; 4 and 5?

(ii) Prediction:
Given the above sequence of observations, what is the state prediction p(x8jy1:5)?

(iii) Smoothing: Show that the smoothing distribution p(xtjy1:T ), where t  T, can be written in
terms of the ltering distribution p(x_t|y1:t), state predictive distribution p(x_t|y1:t) and the transition model  = p(xtjxtô€€€1) as follows:
p(x_t|y_1:T ) = p(x_t|y_1:t)
X
xt+1
p(xt+1jy1:T )p(xt+1jxt)
p(xt+1jy1:t)
Hint: First marginalize xt+1 from p(xt; xt+1jy1:T ), apply conditional probability rules and then use
Bayes rule.
T

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write down the probability tables for robot pet
Reference No:- TGS0113002

Expected delivery within 24 Hours