Git Product home page Git Product logo

sentiment-analysis's Introduction

Twitter-Sentiment-Analysis

A sentiment analysis of a Kenyan bank using tweets. The tweets were sourced using the Twitter API and tweepy, a python library for accessing the twitter API.

Objective 1:To find out the overall sentiment of the bank's customer's based on their tweets.

  1. Irrelevant tweets accounted for the larger percentage, these are tweets meant for advertisement purposes and were not specifically directed at the bank.
  2. Negative tweets were the second larget group
  3. Requests and inquiries came third, these are tweets requesting the bank admin to respond or questions regarding the banks services.
  4. Positive tweets came last with suggestions which I had to exclude from the analysis as the model would not take in a category with only one observation.

Overall_categories

Objective 2: To compare Positive and Negative tweets

The comparison was quite large , with positive tweets not amounting to even half of the negative tweets

Pos_vs_neg

Objective 3: To train the sentiment analysis model to classify tweets as either irrelevant, negative, positive or inquiry/request

Used Sklearn's train_test_split to train the models

Model 1: Using Multinomioal naive bayes to predict tweet labels: Achieved an accuracy of 67.8%

Multinomial_NB

Model 2: Using SVM(Support vector machines): Achieved an accuracy of 66.7%, a little lower than Multinomial NB

SVM

Objective 4: To find the most mentioned aspects throughout the tweets'

Used RegEx to search for the bank's popular services such as the mobile banking app, online banking , customer service e.t.c

Aspects

sentiment-analysis's People

Contributors

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