[R] bnlearn cpquery

Marco Scutari marco.scutari at gmail.com
Fri Jun 3 09:54:00 CEST 2016


Dear Ross,

On Friday, 3 June 2016, <ross.chapman at ecogeonomix.com
<javascript:_e(%7B%7D,'cvml','ross.chapman at ecogeonomix.com');>> wrote:
>
> I find that repeating the command gives very different results for the
> same

set of evidence.


Some variability in the results is expected since they are Monte Carlo
estimates.

What is happening in your case is, I think, that your evidence has a very
low
probability (since it is so complex) and thus you need to generate more
particles
to obtain a reasonably precise estimate of that conditional probability.
For such
a small network cpquery() can easily generate, say, 10^7 particles in a few
seconds.

Can you please advise me what is happening with these queries and why the
> results is so variable and if there are other options for generating
> conditional probabilities with bnlearn.
>

For your query, the default logic sampling is the only option - likelihood
weighting
does not currently support unbounded intervals in the evidence.

Cheers,
    Marco


-- 
Marco Scutari, Ph.D.
Lecturer in Statistics, Department of Statistics
University of Oxford, United Kingdom

	[[alternative HTML version deleted]]



More information about the R-help mailing list