Comparative Analysis of Machine Learning, Deep Learning, and Transformer Models for Multi-Class Emotion Detection on Social Media
Main Article Content
Emotion detection on social media has become increasingly important for understanding public opinion, behavior, and psychological states. This study presents a comparative analysis of machine learning, deep learning, and transformer-based models for multi-class emotion classification. The models evaluated include Naïve Bayes, Support Vector Machine (SVM), Long Short-Term Memory (LSTM), and Bidirectional Encoder Representations from Transformers (BERT). The dataset was preprocessed through text cleaning, normalization, and label grouping into four classes: positive, negative, neutral, and other. Experimental results show that the LSTM model achieves the highest accuracy of 80.95%, outperforming SVM (79.59%), BERT (77.55%), and Naïve Bayes (73.47%). The findings indicate that deep learning models are more effective in capturing contextual and sequential information compared to traditional approaches. However, the performance of the transformer model is affected by dataset limitations, including small size and class imbalance. This study highlights that model performance is highly dependent on data characteristics and demonstrates that LSTM provides a robust solution for emotion detection in imbalanced social media datasets. Future work may focus on improving performance through data balancing techniques and advanced fine-tuning of transformer models.