[SOLVED] CECS451-Homework 9

15.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product
  1. Consider Figure 1, and implement a program to answer the query) by using MCMC sampling. The program should generate 1,000,000 samples to estimate the probability. To answer (a) and (b), you can prepare the answers with scratch paper and print-out them. However, you have to implement a simulation program to answer (c).
  • Show
  • Show the transition probability matrix Q ∈ R4×4 where qij = transition probability from Si to Sj in Figure 2.
  • Show the probability of the query
  • Please follow the output format. (Fix precisions using “0:.nf”.format)

Part A. The sampling probabilities

P(C|-s,r) = <…, …>

P(C|-s,-r) = <…, …>

P(R|c,-s,w) = <…, …>

P(R|-c,-s,w) = <…, …>

Part B. The transition probability matrix

  S1 S2 S3 S4
S1 . . . .
S2 . . . .
S3 . . . .
S4 . . . .

Part C. The probability for the query

P(C|-s,w) = <…, …>

 

Figure 1: A multiply connected network with conditional probability tables. Note that the probabilities are slightly different than the lecture notes and the text book example.

Figure 2: Possible states diagram

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.