I am working on a text mining project using to classify test using Naive Bayes.
When I build a Naive Bayes classifier using
classifier<-naiveBayes(training, type)
then run the predict function on test data:
pred <- predict(classifier, test)
I get:
Error in object$tables[[v]][, nd] : subscript out of bounds
What would be the cause of this error?