Implement using python progeam 1) The Variables used here are as followes B : True if there is a Baseball Game on TV, False if not G: True if George watches TV, False if not C: True if George is out of Cat Food, False if not F: True if George feeds his cat, False if not. Let us say you are given some Training Data which represents what happens over a period of time (For example: This file contains what happens every evening over one specific year). Your Task is to learn the conditonal probabilty tables for the bayesian network from the training data. The training data will be formatted as follows: The first number is 0 if there is no baseball game on TV (B is false), and 1 if there is a baseball game on TV (B is true). The second number is 0 if George does not watch TV (G is false), and 1 if George watches TV (G is true). The third number is 0 if George is not out of cat food (C is false), and 1 if George is out of cat food (C is true). The fourth number is 0 if George does not feed the cat (F is false), and 1 if George feeds the cat (F is true). Your program should be called bnet and the command line invocation should follow the following format: bnet.py text file with training data. You can display the calculated probabilty values in standard output.     2)  Add functionality to the code for Task 1 to also be able to calculate any value in the JPD for this domain using the conditional probabilty distributions calculated in Task 1. [Note: Correct implementation of this section will also give credit for Task 1] Your program's command line invocation will be changed to: bnet.py text file with training data. Bt if B is true, Bf if B is false Gt if G is true, Gf if G is false Ct if C is true, Cf if C is false Ft if F is true, Ff if F is false Sample Invocation: bnet.py training_data.txt Bt Gf Ct Ff Train the Bayesian Network and use it to calculate P(B=t, G=f, C=t, F=f) You can display the calculated probabilty values in standard output.    No hand written and fast answer with explanation    Implement using python program

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Implement using python progeam

1) The Variables used here are as followes

B : True if there is a Baseball Game on TV, False if not

G: True if George watches TV, False if not

C: True if George is out of Cat Food, False if not

F: True if George feeds his cat, False if not.

Let us say you are given some Training Data which represents what happens over a period of time (For example: This file contains what happens every evening over one specific year). Your Task is to learn the conditonal probabilty tables for the bayesian network from the training data. The training data will be formatted as follows:

The first number is 0 if there is no baseball game on TV (B is false), and 1 if there is a baseball game on TV (B is true).

The second number is 0 if George does not watch TV (G is false), and 1 if George watches TV (G is true).

The third number is 0 if George is not out of cat food (C is false), and 1 if George is out of cat food (C is true).

The fourth number is 0 if George does not feed the cat (F is false), and 1 if George feeds the cat (F is true).

Your program should be called bnet and the command line invocation should follow the following format:

bnet.py <training_data>

<training_data> text file with training data.

You can display the calculated probabilty values in standard output.

 

 

2)  Add functionality to the code for Task 1 to also be able to calculate any value in the JPD for this domain using the conditional probabilty distributions calculated in Task 1. [Note: Correct implementation of this section will also give credit for Task 1]

Your program's command line invocation will be changed to:

bnet.py <training_data> <Bt/Bf> <Gt/Gf> <Ct/Cf> <Ft/Ff>

<training_data> text file with training data.

Bt if B is true, Bf if B is false

Gt if G is true, Gf if G is false

Ct if C is true, Cf if C is false

Ft if F is true, Ff if F is false

Sample Invocation: bnet.py training_data.txt Bt Gf Ct Ff Train the Bayesian Network and use it to calculate P(B=t, G=f, C=t, F=f)

You can display the calculated probabilty values in standard output. 

 

No hand written and fast answer with explanation 

 

Implement using python program

B
5
C
F
Image 1: A Bayesian Network
Transcribed Image Text:B 5 C F Image 1: A Bayesian Network
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY