Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Sentiment Analysis using RNN:

  • Sentiment analysis is typically a classification problem.
  • However for a larger data set RNN can provide a better prediction than typical Machine Learning approach.

Output:

  • This is training vs validation loss.
  • Since we have around 25K reviews, the network is over-fitting beyond 5 epochs

Alt text

RNN Model Architecture:

  • We need to calculate the loss against only the last sigmoid unit.
  • The embedding layer will be trained automatically.

Alt text

Hyperparameters:

  • Input Dataset : 25K Reviews
  • Train/Validation/Test Split : 80%/10%/10%
  • Number of hidden layers : 256
  • LSTM Layer ( stacking ) : 2
  • Learning Rate : 0.001
  • Batch Length : 50
  • epochs : 4

Loss:

  • Average Train Loss : 0.6725
  • Average Validation Loss : 1.2836
  • Average Test Loss : 0.529
    • Test Accuracy : 80%

Dataset:

  • Extract the reviews.zip in the dataset folder

Related work: