Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/waizkhan7/sentiment-analysis-of-tweets-using-naive-bayes


https://github.com/waizkhan7/sentiment-analysis-of-tweets-using-naive-bayes

Last synced: 7 days ago
JSON representation

Awesome Lists containing this project

README

        

# Sentiment-Analysis-of-Tweets-Using-Naive-Bayes

In this project, we have tried to classify "Twitter US Airline Sentiment" dataset using Naive Bayes classifier.

**Description:**

At first step, dataset consisting of three classes, Negative, Neutral and Positive Tweets were divided into Train and Test data, which consist of 80% and 20%
of total dataset respectively.

After that, stop words and punctuations were removed to create a Vocabulory of the train dataset. and find frequency of each word of Vocabulory in train dataset.\
Then prior and likelihood of words were calculated and prediction were made about the classes of tweets in Test data.

**Results:**

Results we got on the Test data were good, which are shown below:

Class 0 = Class of Negative Tweets\
Class 1 = Class of Neutral Tweets\
Class 2 = Class of Positive Tweets

![alt text](https://github.com/WaizKhan7/Sentiment-Analysis-of-Tweets-Using-Naive-Bayes/blob/main/Results/results1.PNG?raw=true)

**Confusion Matrix for Negative Tweets:**

![alt text](https://github.com/WaizKhan7/Sentiment-Analysis-of-Tweets-Using-Naive-Bayes/blob/main/Results/negative.PNG?raw=true)

**Confusion Matrix for Neutral Tweets:**

![alt text](https://github.com/WaizKhan7/Sentiment-Analysis-of-Tweets-Using-Naive-Bayes/blob/main/Results/neutral.PNG?raw=true)

**Confusion Matrix for Positive Tweets:**

![alt text](https://github.com/WaizKhan7/Sentiment-Analysis-of-Tweets-Using-Naive-Bayes/blob/main/Results/positive.PNG?raw=true)