Skip to content

Bug in predict function for naiveBayes?

3 messages · Joris Meys, Liaw, Andy

7 days later
#
You need to set "Class" as factor before you call naiveBayes(); i.e.,

    mixture.train$Class <- factor(mixture.train$Class)

Then you can just do:

    pred.bayes <-predict(Bayes.res, mixture.test, type="class")

Andy
Notice:  This e-mail message, together with any attachme...{{dropped:12}}