I have a question w.r.t generating bayesian network using bnlearn package in R. Is it possible to enforce a constraint in below line of code such that all nodes in the network has at least one outgoing arc (i.e. arc going out from a node to some other node)?
bn_users_bic <- bn.cv(data, bn = "hc",runs = 10, cluster=cl, algorithm.args = list(score = "bic" , restart=10, perturb = 5, blacklist = badarcs))
For eg, if I have 4 nodes in my network say A, B, C, D, can I specify constraints while learning bayesian network such that each of these 4 nodes has atleast one outgoing arc (i.e. each of these node impact one other node in the network) ?
If this is not possible in bnlearn package, please let me know any other package in R that can help with this.