Skip to content

The code performs text classification using Naive Bayes models on a dataset. It preprocesses data, uses 3 vectorization techniques (CountVectorizer, TfidfVectorizer, ), and evaluates 9 models. Each model's accuracy, classification report, and confusion matrix are printed. Valuable for learning text classification and experimenting with models.

Notifications You must be signed in to change notification settings

TheCongres/NaiveBayes_With_Vectorizers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

NaiveBayes_With_Vectorizers

The code performs text classification using Naive Bayes models (MultinomialNB, GaussianNB, and BernoulliNB.) on a dataset. It preprocesses data, uses 3 vectorization techniques (CountVectorizer, TF-IDF Vectorizer, and Binary Vectorizer. ), and evaluates 9 models. Each model's accuracy, classification report, and confusion matrix are printed. Valuable for learning text classification and experimenting with models.

Nine different Naive Bayes models (MultinomialNB, GaussianNB, and BernoulliNB) are defined, each using one of the three vectorization methods. The code iterates through these models, trains them on the training data, and evaluates their performance on the testing data. For each model, it prints the model name, accuracy score, classification report (including precision, recall, and F1-score), and confusion matrix.

Overall, this code demonstrates a comprehensive approach to text classification using various Naive Bayes models and vectorization techniques. It's a valuable resource for understanding and experimenting with different strategies for text classification tasks.

About

The code performs text classification using Naive Bayes models on a dataset. It preprocesses data, uses 3 vectorization techniques (CountVectorizer, TfidfVectorizer, ), and evaluates 9 models. Each model's accuracy, classification report, and confusion matrix are printed. Valuable for learning text classification and experimenting with models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages