Page 240 - Contributed Paper Session (CPS) - Volume 2
P. 240
CPS1845 Devni P.S. et al.
( = 1, = 2) ℎ = 1 = 2
( = 1| = 2) = =
( = 2) ℎ = 2
By using the bnlearn package, we can calculate it with the function bn.fit.
The method for determining which estimator to use in this case is "mle", which
is the maximum likelihood estimator.
> bn.mle <- bn.fit(dag, data = Data, method = "mle")
> nparams(bn.mle)
[1] 135
In this case, we will get a CPT for each node. Like the CPT of P that we have
shown below
> bn.mle$P
Parameters of node P (multinomial distribution)
Conditional probability table:
E
P 1 2 3
1 0.00000000 0.10810258 1.00000000
2 0.01919482 0.89189742 0.00000000
3 0.98080518 0.00000000 0.00000000
Then the CPT will be used to establish a network in GeNIe. GeNIe is a
reasoning machine used for graphical probabilistic models and provides the
functionality to make a diagnosis. Users can also do Bayesian inference in the
model and they can calculate the impact of observing the subset values of the
model variables on the probability distribution of the remaining variables
based on real-time data.
Display of Bayesian Network output at GeNIe will be seen in Figure 3.
Figure 3. Graphical Bayesian network model in GeNIe
229 | I S I W S C 2 0 1 9