Re: [R] bnlearn and cpquery

2017-07-14 Thread Ross Chapman
Dear Marco, Thanks for your helpful comments. Using the posterior estimates seems to have fixed the problem. Ross From: Marco Scutari [mailto:marco.scut...@gmail.com] Sent: Thursday, 13 July 2017 7:35 PM To: Ross Chapman Cc: r-help Subject: Re: [R] bnlearn and cpquery

Re: [R] bnlearn and cpquery

2017-07-13 Thread Marco Scutari
Dear Ross, This usually happen because you have parameters with a value of NaN in your network, because the data you estimate the network from are sparse and you are using maximum likelihood estimates. You should either 1) use simpler networks for which you can estimate all conditional distributio

[R] bnlearn and cpquery

2017-07-12 Thread Ross Chapman
Hi all I have built a Bayesian network using discrete data using the bnlearn package. When I try to run the cpquery function on this data it returns NaN for some some cases. Running the cpquery in debug mode for such a case (n=10^5, method="lw") creates the following output: generat