Re: [R] cpquery problem

2016-08-12 Thread ross.chapman
Hi Marco Thanks again for your comments. First, I used the term "EST = y" in my original query as a shorthand, I have used the terms "K1", "M1", and "M2" for all actual queries. If I might expand on the outputs I am getting, I have run predict for the term "ABW" on a data vector with th

Re: [R] cpquery problem

2016-08-10 Thread Marco Scutari
Hi Ross, On 4 August 2016 at 09:37, Ross Chapman wrote: > The network that I am working on has the following coefficients for the > node that I am interested in (ABW): > > Parameters of node ABW (conditional Gaussian distribution) > > Conditional density: ABW | EST + TR + FFB + RF > Coefficient

Re: [R] cpquery problem

2016-08-04 Thread Ross Chapman
Hi Marco Thank you very much for your helpful advice. I have tried you suggestion of using method = 'lw' with cpquery and can now obtain conditional probabilities. However, I am still puzzled over the outputs from the predict() and cpquery functions. The network that I am working on has the fol

Re: [R] cpquery problem

2016-08-01 Thread Marco Scutari
Hi Ross, On 31 July 2016 at 09:11, Ross Chapman wrote: > I have tried running the cpquery in the debug mode, and found that it > typically returns the following for instances where the conditional > probability is returned as 0: > >> event matches 0 samples out of 0 (p = 0) > > Am I right in

Re: [R] cpquery problem

2016-07-31 Thread Ross Chapman
Hi Marco Thanks for your prompt reply. First, I have been using the parse(eval()) convention because I saw it used in some example code for running cpquery, but am happy to drop this practice. I have tried running the cpquery in the debug mode, and found that it typically returns the following f

Re: [R] cpquery problem

2016-07-29 Thread Marco Scutari
Hi Ross, first, I have a side question: is there a particular reason why you are using parse(eval()) in your queries? I know sometimes there is no other solution if you only use exported functions, but you should try not to. It makes for brittle code that breaks easily depending on how variables

[R] cpquery problem

2016-07-28 Thread ross.chapman
Hi all I have a problem with the cpquery function in the bnlearn package. I have constructed a hybrid network (using a mix of continuous and discrete variables). The network is named "fitted". I am interested in predicting the probability of observing a value greater that a particul