Giter Site home page Giter Site logo

sai-likhith / sentiment-analysis-of-covid-19-tweets-a-comparative-analysis-of-classification-models Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.61 MB

This aims to perform sentiment analysis on COVID-19 tweets using various classification models. We preprocess the data, convert words to vectors, and train models such as Naïve Bayes, SVM, and KNN. Finally, we compare their performance to determine the most accurate model for predicting sentiment in COVID-19 tweets.

License: MIT License

Jupyter Notebook 100.00%
covid19-data dataanalysis machine-learning-algorithms python rbf-kernel

sentiment-analysis-of-covid-19-tweets-a-comparative-analysis-of-classification-models's Introduction

Sentiment-Analysis-of-COVID-19-Tweets-A-Comparative-Analysis-of-Classification-Models

This aims to perform sentiment analysis on COVID-19 tweets using various classification models. We preprocess the data, convert words to vectors, and train models such as Naïve Bayes, SVM, and KNN. Finally, we compare their performance to determine the most accurate model for predicting sentiment in COVID-19 tweets.

Problem statement:

Create a classification model to predict the sentiment either (Positive or Negative) based on Covid Tweets

Context:

The tweets have been pulled from Twitter and manual tagging has been done then. The names and usernames have been given codes to avoid any privacy concerns.

The columns are described as follows:

  1. UserName: UserName in encrypted numbers
  2. ScreenName: ScreenName in encrypted numbers
  3. Location: Country from where tweet was pulled from
  4. TweetAt: Twee time
  5. OriginalTweet: Tweet content
  6. Sentiment: Positive, Negative, Neutral, Extremely Positive, Extremely Negative

Steps Involved:

  1. Read the dataset with encoding parameter set to ‘latin1’
  2. Remove handle null values (if any).
  3. Pre-Process the Covid tweets based on the following parameter: a) Tokenizing words b) Convert words to lower case c) Removing Punctuations d) Removing Stop words e) Stemming or lemmatizing the words
  4. Convert the 'Extremely Positive' and 'Extremely Negative' Sentiments to 'Positive' and 'Negative' sentiments respectively
  5. Transform the words into vectors using a) Count Vectorizer or b) TF-IDF Vectorizer
  6. Split data into training and test data.
  7. Apply the following models on the training dataset and generate the predicted value for the test dataset a) Multinomial Naïve Bayes Classification b) SVM Classification c) KNN Classification
  8. Predict the Sentiment for test data
  9. Compute Confusion matrix and classification report for each of these models.
  10. Report the model with the best accuracy.

sentiment-analysis-of-covid-19-tweets-a-comparative-analysis-of-classification-models's People

Contributors

sai-likhith avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.