Open cosmin-novac opened 3 years ago
I fixed this by adding the following lines to cpp.init:
if(class(dnode)=="bn.fit.cgnode") next;
probs <- as.data.frame(dnode$prob)
probs[probs == 0] <- 1e-50
But now the next step doesn't run:
cpp_logLik(bn_data)
Error in cpp_logLik(bn_data) : _Map_base::at
Hi there,
I'm using this together with bnlearn, and I'm receiving the following error:
Upon further investigation, I found out that 1) there are two types of nodes, dnodes and cgnodes. The latter are empty, but the loop in cpp.init still attempts to take them into consideration. Is this correct? 2) rcpp_init_node doesn't accept the probabilities in dnode$prob: "Input probability table contains zero probabilities"