Skip to content

padideee/text-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Text-classification, full implementation from scratch (no libraries):

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.

Text-classification, with libraries

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.

About

Text classification using Bernoulli Naive Bayes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages