[R] Query in R.

Marco Scutari marco.scutari at gmail.com
Mon Feb 29 10:32:14 CET 2016

Hi Rachana,

On 23 February 2016 at 12:38, Rachana Bagde <rachanabagde1996 at gmail.com> wrote:
> Can anyone please solve this query.
> http://stackoverflow.com/questions/35577484/cpquery-of-bnlearn-gives-0-for-every-event-and-evidence-in-r

I think there are several problems with your code.

1) Your variables are continuous, why are you fitting a naive Bayes classifier?

2) Assuming your variables are continuous, any single value for C is
going to have zero probability (the density may be positive, though).

3) Assuming you really want to fit a classifier, you should discretize
the variables into intervals first.


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

More information about the R-help mailing list