A user is trying to run Naive Bayes in R for making predictions from textual data (by building a Document Term Matrix). But he received some weird predictions. Why?


The output is given below


To avoid this issue, the Term Document Matrix or the TDM should get rid of too much sparsity. By adding the below code will fix the problem.


Now the predicted output is given below.




Your Answer

Interviews

Parent Categories