Giter Club home page Giter Club logo

atharvajk98 / uci-sentiment-analysis Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 3.0 36.23 MB

Implementation of various Machine Learning and Deep Learning models for Sentiment Analysis on the 'Sentiment Labelled Sentences Data Set' by University of California, Irvine.

License: MIT License

Jupyter Notebook 98.94% Python 1.06%
sentiment-analysis deep-learning uci-machine-learning machine-learning feedforward-neural-network convolutional-neural-networks lstm-neural-networks bidirectional-lstm linearsvc multinomial-naive-bayes

uci-sentiment-analysis's Introduction

Implementation of Machine Learning and Deep Learning for Sentiment Analysis

  • Sentiment analysis is the process of determining whether a piece of writing is positive, negative or neutral.
  • In this project I have demondtrated how various Machine Learning and Deep Learning models can be used for sentiment analysis.

The Dataset:

  • The dataset used is "Sentiment Labelled Sentences Dataset", from the UC Irvine Machine Learning Repository.

  • The sentences come from three different websites/fields:

    • amazon.com
    • imdb.com
    • yelp.com
  • Each sentence is labelled as either 1 (for positive) or 0 (for negative).

  • For each website,tThere exist 500 positive and 500 negative sentences.

  • This dataset was created for the Paper 'From Group to Individual Labels using Deep Features', Kotzias et. al,. KDD 2015. (Please cite the paper if you want to use it :))

  • Link to the dataset is: Sentiment Labelled Sentences Data Set

  • The dataset is present in the Dataset folder.

Machine Learning models:

  • I have used the follwoing Machine Learning models:
  1. Multinomial Naive bayes
  2. Random Forest
  3. LinearSVC
  • The code implementing these models is in 'modules/Sentiment_Analysis_ML.ipynb'.
  • All the trained models are stored at 'models/ML'. Thereafter the models are segrated as per the dataset (Amazon, IMDB, Yelp).

Deep Learning models:

  • I have used the follwoing Deep Learning models:
  1. Feed Forward Neural Network (FFNN)
  2. Convolutional Neural Network (CNN)
  3. Recurrent Neural Network (LSTM)
  • As the dataset consists of three different set of data, I have created three different implementations for each of them.
  1. Amazon product Rreview Dataset ('modules/Amazon_Sentiment_Analysis_DL.ipynb')
  2. IMDB Movie Review Dataset ('modules/IMDB_Sentiment_Analysis_DL.ipynb')
  3. Yelp Restuarant Review Dataset ('modules/Yelp_Sentiment_Analysis_DL.ipynb')
  • All the trained models are stored at 'models/DL'. Thereafter the models are segrated as per the dataset (Amazon, IMDB, Yelp).

Word Embeddings:

  • All the Deep Learning architectures use the GloVe Word Embeddings.
  • To download click here (please download them before running the code.)
  • The 6 Billion words, 100 dimensional vector representation variant is used.
  • The have been stored at location 'Dataset/GloVe_Word_Embeddings'

Results:

After tyring various machine learning and deep learning models, I got the following results.

Model Amazon Reviews IMDB Reviews Yelp Reviews
Multinomial Naive Bayes 85% 85% 78%
Random Forest 80% 79% 79%
Linear SVC 84% 81.50% 80%
FFNN 81.50% 84% 82%
CNN 87% 85.50% 82.50%
LSTM 87% 85% 83%

uci-sentiment-analysis's People

Contributors

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