Text classification using Bernoulli Naive Bayes from scratch:
- Data cleaning and vectorizing
- BernoullliNB implementation from scratch
- The data train.csv and test.csv should be in the same folder as the bernoulliNB.py
To run the code:
$ python3 bernoulliNB.py
The output is a csv file containing the prediction for the test set.
Comparison of different models:
$ python3 with_libraries.py
info.csv is the output containing the accuracy score of BernoulliNB, MultinomialNB, SVM and GuassianNB models implemented for comparison.