R text classificaton bayesian network



Hi, I need a good R code for text classification - based on multinomial bysein network when test and training data are different. Navies byes does not work for text classification. Gives same prior class probability.


Naive Bayes does not give the same prior probability to all the classes, it is actually the count of total occurrences of the said class divided by the total number of entries.
The following link will help you better understand the prior probabilities and other details of the algorithm:

Reply if you need any further help. :slight_smile:


For unseen data (data not present in training set) Navie Byes always returns same value - prior class probability value assume u have 4 classes - return 0.25 (1/4).

please see code/test data posted (you can run and check)

Can u share code for bysein belief network R text classification for unseen data?

Any other work around for getting unseen word similar to training data (synonym…)