GithubHelp home page GithubHelp logo

brayvid / tweet-sentiment-classifier Goto Github PK

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

Flatiron School Data Science Bootcamp Phase 3 Project

Home Page: https://colab.research.google.com/github/brayvid/tweet-sentiment-classifier/blob/main/tweet_sentiment_classifier.ipynb

Jupyter Notebook 100.00%
classification machine-learning scikit-learn sentiment-analysis twitter data-science kaggle

tweet-sentiment-classifier's Introduction

Tweet Sentiment Classifier

Flatiron School Data Science Bootcamp Phase 3 Project

Business problem

Brand reputation management

Monitor brand perception by correctly classifying new tweets as positive, negative or neutral.

  • Analyze negative feedback for insights into product weaknesses and use this to drive improvements.
  • Identify accounts with consistent positive sentiment and offer to collaborate.
  • Time launches of new products during periods of high positive sentiment.

Dataset

  • Three classes: positive, negative, neutral in column called sentiment.
  • 27,000 tweets formatted as strings in text column.
  • selected_text is an additional column containing the substring of each tweet relevant to classification.

Results

I tried several model types, and a Support Vector Classifier (SVC) applied to ‘selected_text’ yielded the best performance. Test set results are summarized below, with precision and recall scores per class and a confusion matrix. Test accuracy was 83%.

Label Precision Recall
negative 83% 77%
neutral 78% 91%
positive 93% 80%

Next steps

  • Try Word2Vec semantic embedding instead of frequency-based TF-IDF.
  • Investigate dimensionality reduction with UMAP or t-SNE.
  • Deploy to a web service to classify new tweets in real time.

This project highlights the importance of sentiment analysis in brand reputation management and provides a foundation for further development and deployment in a real-world setting.

tweet-sentiment-classifier's People

Contributors

brayvid 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.