Coder Social home page Coder Social logo

amritk10 / twitter_us_airline_sentiment_analysis Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.08 MB

Analysing how travellers in February 2015 expressed their feelings on Twitter.

License: MIT License

Jupyter Notebook 100.00%
twitter-sentiment-analysis svm multinomial-naive-bayes machine-learning nlp

twitter_us_airline_sentiment_analysis's Introduction

Twitter_US_Airline_Sentiment_Analysis

Dataset

This data originally came from Crowdflower's Data for Everyone library: http://www.crowdflower.com/data-for-everyone which states:
A sentiment analysis job about the problems of each major U.S. airline. Twitter data was scraped from February of 2015 and contributors were asked to first classify positive, negative, and neutral tweets, followed by categorizing negative reasons (such as "late flight" or "rude service").

It contains whether the sentiment of the tweets in this set was positive, neutral, or negative for six US airlines:
Screen Shot 2019-03-31 at 5 50 43 PM

Features

The csv file has been added to the repo as Tweets_data.csv.It contains the following features (columns):
tweet_id
airline_sentiment
airline_sentiment_confidence
negativereason
negativereason_confidence
airline
airline_sentiment_gold
name
negativereason_gold
retweet_count
text
tweet_coord
tweet_created
tweet_location
user_timezone
Tweets

Implementation

The data was cleaned using Natural Language Toolkit (NLTK).
For the analysis, Multinomial Naive Bayes and Supprt Vector Machine were used.

Multinomial Naive Bayes Results

MultinomialNB classifier from sklearn was used.
Training Accuracy: 80.87%
Testing Accuracy: 77.18%

Support Vector Machine Results

SVC classifier from sklearn was used.
Training Accuracy: 87.94%
Training Weighted Average F1-score: 0.88
Testing Accuracy: 78.79%
Testing Weighted Average F1-score: 0.79

twitter_us_airline_sentiment_analysis's People

Contributors

amritk10 avatar

Stargazers

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