Skip to content
Prev 293554 / 398502 Next

weird predict function error when I use naive bayes

Hi,

I tried to use naivebayes in package 'e1071'.
when I use following parameter, only one predictor, there is an error.
Error in log(sapply(attribs, function(v) { :
   Non-numeric argument to mathematical function


However, when I use two predictors, there is not error any more.
setosa versicolor virginica
   setosa         49          0         0
   versicolor      1         37        19
   virginica       0         13        31

Do you know what is the problem?

Br,
Luffy