[R] bnlearn and TAN network
ross.chapman at ecogeonomix.com
ross.chapman at ecogeonomix.com
Mon Feb 29 09:46:25 CET 2016
Hi all,
I have created a TAN network using bnlearn in R using the commands:
TAN <- tree.bayes(training.data,"classFFB")
fitted <- bn.fit(TAN,training.data,method="bayes")
where training.data is a dataframe with 6 variables.
I have produced a plot of the network using graphviz.plot:
graphviz.plot(TAN)
The graph shows arcs between each of the variables and the output node
(classFFB) along with internal nodes showing parent/child relations between
4 nodes.
However, when I look at the model in the TAN object and the conditional
probabilities in the fitted object, there is only one direct arc leading to
output node (classFFB) through a variable EST, all other relations act
through that arc.
Am I correct in interpreting that the all direct nodes except for
EST->classFFB which are shown in the graphviz.plot are not retained once the
model is trained. In which case, is there a way of showing the network after
training?
Thanks in advance
Ross
[[alternative HTML version deleted]]
More information about the R-help
mailing list