Research Article

A novel ensemble model for emotion classification in social media text

Xintong Jiang*
National University of Singapore

* Corresponding author: [email protected]

Abstract

Social media provides people with a platform to share their experiences and perspectives, and text is the most common way as either posts or comments. Much emotion-related information, such as mental state and attitude, can be revealed through texts. As a result, text-based emotion analysis plays an important role. This paper aims to propose a new classification model using the ensemble learning method, which can classify the emotions detected from the text into six classes, including joy, fear, surprise, love, sadness, and anger. Multiple base models are trained at the first stage, including traditional machine learning models (Multinomial Naive Bayes, SVM, and Decision Tree) and deep learning models (CNN, LSTM, and GRU). Then, a new ensemble model using the stacking method is developed. The stacking of deep learning models and SVM has achieved the best classification performance, where the accuracy and F1 score are 0.8875 and 0.8410, respectively. The evaluation metrics demonstrate the effectiveness and robustness of the new ensemble model for this emotion classification task.

Keywords: machine learning; ensemble learning; deep learning; text classification; emotion analysis
Published: July 31, 2024
DOI: 10.54254/2755-2721/86/20241549
Volume: ACE Vol.86
pp. 30-41
Download PDF

References

  1. Moolthaisong, Kamoltep, and Wararat Songpan. “Emotion Analysis and classification of movie reviews using Data Mining.” 2020 International Conference on Data Science, Artificial Intelligence, and Business Analytics (DATABIA), July 2020, https://doi.org/10.1109/databia50434.2020.9190363.
  2. Ahmad, Shimi Naurin, and Michel Laroche. “How do expressed emotions affect the helpfulness of a product review? evidence from reviews using latent semantic analysis.” International Journal of Electronic Commerce, vol. 20, no. 1, 31 Aug. 2015, pp. 76–111, https://doi.org/10.1080/10864415.2016.1061471.
  3. Gates, Kelly. “Designing effective consumers: Emotion Analysis in Market Research.” The Routledge Companion to Global Popular Culture, 5 Dec. 2014, pp. 99–114, https://doi.org/10.4324/9780203081846-16.
  4. Zamani, H., A. Abas, and M. K. M.Amin. “Eye Tracking Application on Emotion Analysis for Marketing Strategy”. Journal of Telecommunication, Electronic and Computer Engineering (JTEC), vol. 8, no. 11, Dec. 2016, pp. 87-91, https://jtec.utem.edu.my/jtec/article/view/1415.
  5. Cherry, Colin, et al. “Binary classifiers and latent sequence models for emotion detection in suicide notes.” Biomedical Informatics Insights, vol. 5s1, Jan. 2012, https://doi.org/10.4137/bii.s8933.
  6. Ekman, Paul. “An argument for basic emotions.” Cognition and Emotion, vol. 6, no. 3–4, May 1992, pp. 169–200, https://doi.org/10.1080/02699939208411068.
  7. Tomkins, Silvan S., and Robert McCarter. “What and where are the primary affects? some evidence for a theory.” Perceptual and Motor Skills, vol. 18, no. 1, Feb. 1964, pp. 119–158, https://doi.org/10.2466/pms.1964.18.1.119.
  8. Russell, James A. “A circumplex model of affect.” Journal of Personality and Social Psychology, vol. 39, no. 6, Dec. 1980, pp. 1161–1178, https://doi.org/10.1037/h0077714.
  9. Rahman, Romana, et al. Detecting Emotion from Text and Emoticon, 2017, www.researchgate.net/publication/328174790_Detecting_Emotion_from_Text_and_Emoticon.
  10. Seal, Dibyendu, et al. “Sentence-level emotion detection from text based on Semantic Rules.” Information and Communication Technology for Sustainable Development, 26 June 2019, pp. 423–430, https://doi.org/10.1007/978-981-13-7166-0_42.
  11. Mohammad, Saif M., and Svetlana Kiritchenko. “Using hashtags to capture fine emotion categories from tweets.” Computational Intelligence, vol. 31, no. 2, 10 Jan. 2014, pp. 301–326, https://doi.org/10.1111/coin.12024.
  12. Hasan, Maryam, et al. EMOTEX: Detecting Emotions in Twitter Messages, 27 May 2014, www.sciencedirect.com/science/article/pii/S1877750318311037.
  13. Go, Alec, et al. Twitter Sentiment Classification Using Distant Supervision, 4 Sept. 2014, www.academia.edu/8202882/Twitter_Sentiment_Classification_using_Distant_Supervision.
  14. Agrawal, Ameeta, and Aijun An. “Unsupervised emotion detection from text using semantic and syntactic relations.” 2012 IEEE/WIC/ACM International Conferences on Web Intelligence and Intelligent Agent Technology, Dec. 2012, https://doi.org/10.1109/wi-iat.2012.170.
  15. Yasmina, Douiji, et al. “Using YouTube comments for text-based emotion recognition.” Procedia Computer Science, vol. 83, 2016, pp. 292–299, https://doi.org/10.1016/j.procs.2016.04.128.
  16. Li, Shoushan, et al. Employing Personal/Impersonal Views in Supervised and Semi-Supervised Sentiment Classification, 2010, www.researchgate.net/publication/220875008_Employing_Person alImpersonal_Views_in_Supervised_and_Semi-Supervised_Sentiment_Classification.
  17. Zhou, Shusen, et al. “Active deep learning method for semi-supervised sentiment classification.” Neurocomputing, vol. 120, Nov. 2013, pp. 536–546, https://doi.org/10.1016/j.neucom.2013.04.017.
  18. Xu, Dongliang, et al. “Deep Learning Based Emotion Analysis of Microblog texts.” Information fusion, vol. 64, Dec. 2020, pp. 1–11, https://doi.org/10.1016/j.inffus.2020.06.002.
  19. Zahiri, Sayyed M., and Jinho D. Choi. “Emotion Detection on TV Show Transcripts with Sequence-Based Convolutional Neural Networks.” arXiv.Org, 14 Aug. 2017, arxiv.org/abs/1708.04299.
  20. Prakash Tiwari, Sudhanshu, et al. “A novel approach for detecting emotion in text.” Indian Journal of Science and Technology, vol. 9, no. 29, 22 Aug. 2016, https://doi.org/10.17485/ijst/2016/v9i29/88211.
  21. Grover, Sheeba, and Amandeep Verma. “Design for emotion detection of Punjabi text using hybrid approach.” 2016 International Conference on Inventive Computation Technologies (ICICT), Aug. 2016, https://doi.org/10.1109/inventive.2016.7824823.
  22. DeepLearning.AI. “Natural Language Processing (NLP) [a Complete Guide].” DeepLearning.AI, 11 Jan. 2023, www.deeplearning.ai/resources/natural-language-processing.
  23. Singh, Anita Kumari, and Mogalla Shashi. “Vectorization of Text Documents for Identifying Unifiable News Articles.” International Journal of Advanced Computer Science and Applications/International Journal of Advanced Computer Science & Applications, vol. 10, no. 7, Jan. 2019, https://doi.org/10.14569/ijacsa.2019.0100742.
  24. Batista, Gustavo E., et al. “A study of the behavior of several methods for balancing machine learning training data.” ACM SIGKDD Explorations Newsletter, vol. 6, no. 1, June 2004, pp. 20–29, https://doi.org/10.1145/1007730.1007735.
  25. Jiang, Liangxiao, et al. “Structure Extended Multinomial Naive Bayes.” Information sciences, vol. 329, Feb. 2016, pp. 346–56. https://doi.org/10.1016/j.ins.2015.09.037.
  26. Chang, Chih-Chung, et al. A Practical Guide to Support Vector Classification, May 2016, www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf.
  27. Kotsiantis, Sotiris. “Supervised Machine Learning: A Review of Classification Techniques.” Informatica, vol. 31, July 2007, pp. 249–68.
  28. Alzubaidi, L. et al. (2021) ‘Review of Deep Learning: Concepts, CNN Architectures, challenges, applications, Future Directions’, Journal of Big Data, 8(1). doi:10.1186/s40537-021-00444-8.
  29. Sabri, Mohammed, and Mohammed El Hassouni. “A Novel Deep Learning Approach for Short Term Photovoltaic Power Forecasting Based on GRU-CNN Model.” E3S Web of Conferences, vol. 336, Jan. 2022, p. 00064. https://doi.org/10.1051/e3sconf/202233600064.
  30. Dey, Rahul, and Fathi M. Salem. “Gate-variants of gated recurrent unit (GRU) neural networks.” 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Aug. 2017, https://doi.org/10.1109/mwscas.2017.8053243
  31. Zhou, Zhi-Hua. “Ensemble Methods.” Chapman and Hall/CRC eBooks, 2012, https://doi.org/10.1201/b12207.
  32. Mienye, Ibomoiye Domor, and Yanxia Sun. “A Survey of Ensemble Learning: Concepts, Algorithms, Applications, and Prospects.” IEEE Access, vol. 10, Jan. 2022, pp. 99129–49. https://doi.org/10.1109/access.2022.3207287.
  33. Nguyen, Kieu Anh, et al. “Comparison of Ensemble Machine Learning Methods for Soil Erosion Pin Measurements.” ISPRS International Journal of Geo-information, vol. 10, no. 1, Jan. 2021, p. 42. https://doi.org/10.3390/ijgi10010042.
  34. Sutton, Clifton D. “Classification and Regression Trees, Bagging, and Boosting.” Handbook of statistics, 2005, pp. 303–29. https://doi.org/10.1016/s0169-7161(04)24011-1.
  35. Friedman, Jerome H. “Greedy function approximation: A gradient boosting machine.” The Annals of Statistics, vol. 29, no. 5, 1 Oct. 2001, https://doi.org/10.1214/aos/1013203451.