Write R code that will create the Bayesian network shown below. Include your cod
ID: 3861069 • Letter: W
Question
Write R code that will create the Bayesian network shown below. Include your code and output (e.g., a screenshot of a plot) that shows the Bayesian network graph and the contents of each node’s probability table. Then write R code that uses the Bayesian network to predict Quality for the following 2 instances:
(i) Location = Good, Quality = Normal, Cost = High, No. of People = Low, and
(ii) Location = Bad, Quality = Good, Cost = Low, No. of People = High; include output (e.g., a screenshot) that shows the results of those predictions as a confusion matrix.
LocationPIL) 0.6 0.4 Qualy PO) Good 03 Normal05 Bad 0.2 Good Location (L) Qualty ( Cost (C) Good Bad QualityGoodNomal Bad Good Nomal Ba Cost High 08 0.1 0.6 005 No. of People (N) 0.2 04 0.9 0.4 0.4 005 Good Cost No. of People 0.8 0.6 0.9 0.4Explanation / Answer
Bayesian Network is also called as belief Network
probabilistic directed acycalic graphic model that represents a set of random variable and their conditional dependencies. Bayesian networks are graphical models where node represents random variable and arrows represents probablistic dependencies
The graphical structure g=(v,a) of a bayesian network is a directed acyclic graph.where v is the node set and a is the arc set
DAG (Directed Acyclic Graph) defines a fractionization of the joint probability distribution of v={x1,x2 .......,xv} often called gloabl probability distribution.
There are many possible choices of both global and local distribution functions
1.muitinominal data
2.multivariate normal data
Bayesian network algorithm can be grouped in to two categories
Constant based Algorithms
Score Based Algorithms
constant based algorithms are based on inductive causation algorithm
1.first skeleton based is learned.since an exahustive computationaly functional for all simple data set.
2.set all directions are as the part of the v-structure(xj->xi->xk)
3.set the directions of other arcs as the needed of the acyclicity constraint.
score based algorithms on the other hand are heuristic search algorithms such as hill climbing,tabu search simulated annealing and various genetic algorithm.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.