[R] bnlearn cpquery NA problem

Yujian Liu yuj|@n| @end|ng |rom um|ch@edu
Wed Jun 12 19:34:16 CEST 2019

Hi all,

I'm using bnlearn to build a Bayesian Network with 167 nodes. I have got
the fitted network, but when I try to do inference using cpquery (or
cpdist), I got this error message:

Error in logical(n) : vector size cannot be NA/NaNIn addition: Warning
message:In check.cpq.args(fitted = fitted, event = NULL, extra.args =
list(...),  :  NaNs produced

I got the bn.fit object by calling bn.fit using "bayes" method, and I
also tried "mle" method with replace.unidentifiable setting to TRUE.
But both of them gave me the above error when doing inference.

Does anyone have any recommended solution to fix this?

Many thanks,


	[[alternative HTML version deleted]]

More information about the R-help mailing list