Skip to content

Here I have implemented the NaiveBayes Classifier (already implemented in Sklearn) from scratch and used it to perform Text Classificationđź”  .

Notifications You must be signed in to change notification settings

KeeratSachdeva/TEXT-CLASSIFICATION

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Intoduction :

Text classification is a process of assigning tags or categories to a text according to its content . It's one of the fundamental tasks in Natural Language Processing (NLP) with broad applications such as sentiment analysis, topic labeling, spam detection etc.

# What I Did ?

  1. Performed Text Classification using Multinomial Naive Bayes(already implemented in sklearn).
  2. Implemented Naive Bayes from scratch for Text Classification.
  3. Compared the Results of my implementation of Naive Bayes with the one in Sklearn.

# Text Classification Problem :

Here,We are provided with several news articles related to various fields like science,sports,politics etc. and we are supposed to build a classifier and train that classifier upon these articles such that in future, given a news article it can predict the category or the field to which this news belong.

The entire code has been written in Python3.

# How I Did it?

I have tried to keep it as simple as possible(by sticking to the algorithm behind NaiveBayes' classification) . I have tried to mention every minute detail in the form of comments so that one can analyze each and every aspect of it.

# Results :

# Classification Report for Sklearn's MultiNomialNaiveBayes' Classifier :

ClassificationReport1

# Classification Report for My TextClassification code :

ClassificationReport2

# Here's a look to the evaluation I got from my Instructor :

Result

About

Here I have implemented the NaiveBayes Classifier (already implemented in Sklearn) from scratch and used it to perform Text Classificationđź”  .

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages