Skip to content
Prev 171865 / 398503 Next

Bug in predict function for naiveBayes?

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}}