A Comparative Study of Multinomial Naive Bayes and Long Short-Term Memory (LSTM) for Sentiment Classification on the IMDB Movie Review Dataset - Yutika Amelia Effendi; Achmad Arif Mahzumi; Violeta Hawariznova Willes; Yahya Bachtiar Ivansyah (Faculty of Advanced Technology and Multidiscipline Universitas Airlangga, 2026)
This study presents a comparative analysis of two widely-used sentiment classification models—Multinomial Naive Bayes (MNB) and Long Short-Term Memory (LSTM)—using the IMDB movie review dataset. The research is centered on binary sentiment classification, identifying whether a movie review expresses a positive or negative sentiment. The preprocessing pipeline involves lowercasing, tokenization, removal of stopwords and special characters, and stemming (applied only in the LSTM pipeline). The MNB model employs a Bag-of-Words approach using CountVectorizer, while the LSTM model uses an embedding layer followed by a sequence-based deep learning architecture. Performance is evaluated using accuracy, precision, recall, and F1-score on a test set of 25,000 reviews. The Naive Bayes model achieved an accuracy of 85.93%, while the LSTM model outperformed it with an accuracy of 90%. Further tests on new, handcrafted reviews showed that the LSTM model exhibited higher confidence in predictions, especially in clearly polarized reviews. These findings highlight that while Naive Bayes is computationally efficient and performs adequately, LSTM offers superior accuracy and robustness in understanding semantic patterns in text. This research contributes to the development of more reliable AI-based sentiment analysis systems and offers insights for practitioners deciding between traditional machine learning and deep learning approaches in natural language processing tasks.