Description
Natural Language Processing)
25% of the course mark
1. Develop a sentiment classifier with 3 classes (pro-vax, anti-vax, neutral) using a bidirectional stacked RNN with LSTM/GRU cells for the Twitter vaccine sentiment dataset of the previous two assignments. For the development of the models, you can experiment with the number of stacked RNNs, the number of hidden layers, type of cells, skip connections, gradient clipping and dropout probability. Document the performance of different configurations on your final report. Use the Adam optimizer and the cross-entropy loss function. You should also utilize GloVe pre-trained word embeddings as the embeddings of the inputs of your models.
For the best model you will find: • Compute precision, recall and F1 for each class.
• Plot the loss vs. epochs curve and the ROC curve (on the validation set, after training has been completed) and explain what you see.
• Compare with your best model from Homeworks 1 and 2.
Your solution should be implemented in PyTorch and we expect your report to be well documented.
(9/10 marks)
2. Add attention to the best model you developed in the previous question. Evaluate the improvements that you might have from its introduction.
(1/10 marks)
Note: You should hand in: (i) a pdf with a detailed report of your solution for the two questions, including an explanation of the methods you used, an evaluation and comparison of different approaches you tried and citations to relevant literature that you might have used in developing your solutions. (ii) one Colab notebook (ipynb files using https://colab.research.google.com/) containing your code. You should use Python 3.6 or a later version.
1




Reviews
There are no reviews yet.