Skip to content

PrashanthaTP/tweet-sentiment-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tweet Sentiment Classification

Python PyTorch


This repo contains Python implementation of Sentiment Analysis of Tweets using Neural Networks with Pytorch.

Overview

  • Framework used : Pytorch
  • Architectures : LSTM,CNN(2D), and a hybrid of these two
  • Dataset : Sentiment140
  • Final accuracy : 82.157433 %
  • Report

Scripts

#Architectures :

CNN based Model

CNN architecture

LSTM based Model

LSTM architecture

Hybrid Model

Hybrid Model

#Results

Accuracy

  • CNN based model : 79.28%
  • LSTM based model : 82.5%
  • Hybrid Model : 82.15%

Confusion Matrices

  • For cnn based model

    CNN based model cm

  • For LSTM based model

    LSTM based model cm

  • For hybrid model

    Hybrid Model cm

References


  • Dataset
@ONLINE {Sentiment140,
    author = "Go, Alec and Bhayani, Richa and Huang, Lei",
    title  = "Twitter Sentiment Classification using Distant Supervision",
    year   = "2009",
    url    = "http://help.sentiment140.com/home"
}