Skip to content

Sentiment Classifier using a bidirectional stacked RNN with LSTM/GRU cells for the Twitter sentiment analysis dataset

Notifications You must be signed in to change notification settings

alexaapo/Bidirectional-stacked-RNN-with-LSTM-GRU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Bidirectional stacked RNN with LSTM/GRU

Here I develop a sentiment classifier using a bidirectional stacked RNN with LSTM/GRU cells for the Twitter sentiment analysis dataset, which is available here.

For the development of the models, I experimented with the number of stacked RNNs, the number of hidden layers, type of cells, skip connections, gradient clipping and dropout probability. I use the Adam optimizer and the binary cross-entropy loss function and I transformed the predicted logits to probabilities using a sigmoid function.

For the best model I found:

  • Compute precision, recall and F1 for each class.
  • Plot the loss vs epochs curve and the ROC curve

My solution is implemented in PyTorch and the report is well documented. I also have a notebook with the preprocess of the data. For running them, I used the Google Colab with its GPU.

Note: I also utilize pre-trained word embeddings GloVe as the initial embeddings to input on your models.

You can check the Google Colab Notebooks here:

  • Preprocessing of data: Open In Colab
  • Bidirectional stacked RNN with LSTM/GRU: Open In Colab

About

Sentiment Classifier using a bidirectional stacked RNN with LSTM/GRU cells for the Twitter sentiment analysis dataset

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published