LocationPIL) 0.6 0.4 Qualy PO) Good 03 Normal05 Bad 0.2 Good Location (L) Qualty
ID: 3861172 • Letter: L
Question
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
> library(bnlearn) Loading required package: methods > data(learning.test) > pdag = iamb(learning.test) > pdag score(set.arc(pdag, from = "L", to = "C"), learning.test) dag = set.arc(pdag, from = "L", to = "C") dag = set.arc(pdag, from = "L", to = "N") dag = set.arc(pdag, from = "C", to = "N") dag = set.arc(pdag, from = "Q", to = "C") fit = bn.fit(dag, learning.test) bn.fit.barchart(fit$D)