[SOLVED] CSE571 Bayesian Networks

30.00 $

Category:

Description

Rate this product

 

  • Create Bayesian Networks.
  • Determine inferences from Bayesian Networks.
  • Model real-world problems in Bayesian Networks.

Technology Requirements: 

  • Linux (windows user may install virtual machines)
  • Python 3.4 or higher
  • Download and install pip and then install pgmpy:

○    $ git clone https://github.com/pgmpy/pgmpy

○    $ cd pgmpy/

○    $ sudo pip install -r requirements.txt

○    $ sudo python setup.py install

*Note:​ if you encountered problems installing pip or pgmpy, refer to the pgmpy

Installation Page: https://github.com/pgmpy/pgmpy#installation

**You can find the documents for pgmpy on the pgmpy Documentation Page.​

Project Description: 

Familiarize with the Bayesian Model (BN) class in pgmpy library. An example (py​ )​ illustrating BN construction an inference is provided for the following BN:

Run bn.py by “python bn.py”. The following shows you the results of two queries:

  1. P(D|-c) = {0.65, 0.35}
  2. P(C|-s, -p) = {0.97, 0.03}
  3. Answer the following questions using the provided code and​ by hand to see whether​            they match (this question is not graded):
    1. P(+d|+s)
    2. P(+x|+d,-s)
    3. Does pgmpy return exact results (up to the system’s accuracy)?
  4. Create code for the following BN:

Artificial Intelligence: A Modern Approach​ 3rd Edition​.

Save it as “burglary.py​      ”. Important: please follow the instructions in the template provided to​           you to name your variables and structure your code.

  1. Answer the following questions using your code and​ by hand to see whether they match​  (this question is not graded but the code output should match with your computation by hand):
    1. P(+j|-e)
    2. P(+m|+b,-e)
    3. P(+m|+b,+e)
    4. P(+m|+j)
    5. P(+m|+j,-b,-e)
  1. Familiarize with the Dynamic Bayesian Model (DBN) class in pgmpy library. An example (py​ )​ illustrating DBN construction an inference is provided for the following DBN:

Run dbn.py by “python dbn.py”. The following  shows you the results of a query:

  1. P(G3|g0=1, g1=2) = {0.4358, 0.2552, 0.3090} ​ (the distribution of G at the 3rd​ time slice given g0=1 at the zeroth step and g1=2 at the first step)
  2. Create code for the DBN for the following problem, which is similar to the problem discussed in our DBN lecture:
  3. You agent always move in a clockwise fashion
  4. When it moves, it has a 50% chance of moving to the desired location and 50% it stays where it was.
  5. The robot is equipped with a sensor that returns the correct position with a 60% chance and a random position (including the correct position) with a 40% chance
  6. The agent starts at C at time 0.

Save it as “agent.py​     ”. Important: please follow the instructions in the template provided​ to you to name your variables and structure your code.

  1. Test your code thoroughly.

For example, P(Location1 = A | Sensor 1=C)= 0.125   (The probability of the agent at location A at step 1 given that the sensor at step 1 returns C.