I learnt Bayesian Network (BN) structures with the bnlearn
package in R. However, for some of my BN, I have undirected edges.
Thus, when I want to fit the BN (i.e. learn the Conditional Probability Tables = CPT), I obtain this error message telling me that it is not possible to learn CPT:
Error in bn.fit(struct_list[[i]][[ii]], data = dbnBnlearn_general %>% ... : the graph is only partially directed.
So my question is: is there a way to force the structure to be directed (I tried the undirected
argument of the structure learning algorithm but there are still undirected edges)?
Cheers