Sentiment Analysis on IMDB Reviews leveraging Transfer Learning and Neural Network Models via Keras API
Date
2024-09-13
Authors
Kharmandar, Armita
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
This project focuses on sentiment analysis using a pre-labeled IMDB dataset containing 50,000 movie reviews. Our approach leverages transfer learning and a pre-trained neural network from TensorFlow Hub, specifically the NNLM model, to streamline the preprocessing stage. The sentiment classification model is built using the Keras API with a Sequential architecture. To design the model, several attempts have been made to improve the performance and overall accuracy and the finalized model includes first layer of an embedding layer that utilizes the pre-trained NNLM embeddings, followed by a three-layer network consisting of dense layer, dropout layer and another dense layer for classification respectively. To compile the model, Adam optimizer and binary cross-entropy loss are defined while achieving an accuracy of almost 88%. In addition to this deep learning model, traditional sentiment analysis algorithms such as logistic regression, random forest, and SVM were also trained for comparison. Each attempt’s output is visualized and finally in conclusion part it is discussed which of the models output the desired performance considering two factors of efficiency and accuracy. The results highlight that by incorporating transfer learning and Keras API, the overall model complexity and computational cost were significantly reduced while maintaining competitive accuracy.
Description
Keywords
Sentiment analysis + Transfer Learning + Neural Network + Keras API + Efficient + Logistic Regression + Support Vector Machine + Random Forrest