I am running a NaiveBayes model for text analysis with about more than 2000 variables and more than 30000 observations. It is really sparse data, but without any zero or constant column.
model <- NaiveBayes(nation~., data=data_train)
I am getting :
"Zero variances for at least one class in variables: "
and a list of 50 variables. The error is similar to the one bellow, but my class variable is a factor. https://stats.stackexchange.com/questions/35694/naive-bayes-fails-with-a-perfect-predictor.
I also ran e1071's naiveBayes on the same data. It runs, but the accuracy is ridiculously low (7%). And I get 85% with SVM. Any suggestion? Thanks.