journal article·2024-10-28Open access

Performance Metrics for Multilabel Emotion Classification: Comparing Micro, Macro, and Weighted F1-Scores

Maria Cristina Hinojosa Lee, Johan Braet, Johan Springael

Applied Sciences· Volume 14· Issue 21

Abstract

This study compares various F1-score variants—micro, macro, and weighted—to assess their performance in evaluating text-based emotion classification. Lexicon distillation is employed using the multilabel emotion-annotated datasets XED and GoEmotions. The aim of this paper is to understand when each F1-score variant is better suited for evaluating text-based multilabel emotion classification. Unigram lexicons were derived from the annotated GoEmotions and XED datasets through a binary classification approach. The distilled lexicons were then applied to the GoEmotions and XED annotated datasets to calculate their emotional content, and the results were compared. The findings highlight the behavior of each F1-score variant under different class distributions, emphasizing the importance of appropriate metric selection for reliable model performance evaluation in imbalanced multilabel datasets. Additionally, this study also investigates the effect of the aggregation of negative emotions into broader categories on said F1 metrics. The contribution of this study is to provide insights into how different F1-score variants could improve the reliability of multilabel emotion classifier evaluation, particularly in the context of class imbalance present in the case of phishing emails.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Sentiment Analysis and Opinion Mining · Text and Document Classification Technologies · Emotion and Mood Recognition

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Engineering Management, University of Antwerp, 2000 Antwerpen, Belgium

References (61)

Show source-provided references
1. Alpaydin, E. (2016). Machine Learning: The New AI, MIT Press.
2. Machine learning applications in epilepsy10.1111/epi.16333 ↗
3. Ford, V., and Siraj, A. (2014, January 13–15). Applications of Machine Learning in Cyber Security. Proceedings of the 27th International Conference on Computer Applications in Industry and Engineering, CAINE 2014, New Orleans, LA, USA.
4. Machine Learning in Medicine10.1056/NEJMra1814259 ↗
5. Kelleher, J., Mac Namee, B., and D’Arcy, A. (2015). Fundamentals of Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples, and Case Studies, MIT Press.
6. Rainio, O., Teuho, J., and Klen, R. (2024). Evaluation metrics and statistical tests for machine learning. Sci. Rep., 14.10.1038/s41598-024-56706-x ↗
7. A systematic analysis of performance measures for classification tasks10.1016/j.ipm.2009.03.002 ↗
8. Confidence interval for micro-averaged F1 and macro-averaged F1 scores10.1007/s10489-021-02635-5 ↗
9. Sammut, C., and Webb, G.I. (2010). Precision and Recall. Encyclopedia of Machine Learning, Springer.10.1007/978-0-387-30164-8 ↗
10. Rijsbergen, C.J.V. (1979). Information Retrieval, Butterworths.
11. Chicco, D., and Jurman, G. (2020). The advantages of the Matthews correlation coefficient (MCC) over F1-score and accuracy in binary classification evaluation. BMC Genom., 21.10.1186/s12864-019-6413-7 ↗
12. Precision–recall curve (PRC) classification trees10.1007/s12065-021-00565-2 ↗
13. Optimal Dependence of Performance and Efficiency of Collaborative Filtering on Random Stratified Subsampling10.26599/BDMA.2021.9020032 ↗
14. Poudel, S. (2022). A study of disease diagnosis using machine learning. Med. Sci. Forum, 10.10.3390/IECH2022-12311 ↗
15. BERT-CNN: A Deep Learning Model for Detecting Emotions from Text
16. An efficient way of text-based emotion analysis from social media using LRA-DNN
17. Survey on deep learning with class imbalance10.1186/s40537-019-0192-5 ↗
18. Evaluation Measures for Models Assessment over Imbalanced Data Sets
19. Evaluation: From precision, recall and F-measure to ROC, informedness, markedness & correlation
20. Gu, Q., Zhu, L., and Cai, Z. (2009, January 23–25). Evaluation Measures of the Classification Performance of Imbalanced Data Sets. Proceedings of the Computational Intelligence and Intelligent Systems: 4th International Symposium, ISICA 2009, Huangshi, China.
21. Tackling the Problem of Class Imbalance in Multi-class Sentiment Classification: An Experimental Study10.2478/fcds-2019-0009 ↗
22. Word Embedding Composition for Data Imbalances in Sentiment and Emotion Classification10.1007/s12559-015-9319-y ↗
23. Akosa, J.S. (2017, January 2–5). Predictive Accuracy: A Misleading Performance Measure for Highly Imbalanced Data. Proceedings of the SAS Global Forum 2017 Conference, Orlando, FL, USA.
24. Flach, P.A., and Kull, M. (2015, January 7–12). Precision-Recall-Gain Curves: PR Analysis Done Right. Proceedings of the Advances in Neural Information Processing Systems 28 (Nips 2015), Montreal, QC, Canada.
25. MLCM: Multi-Label Confusion Matrix10.1109/ACCESS.2022.3151048 ↗
26. Chicco, D., and Jurman, G. (2023). The Matthews correlation coefficient (MCC) should replace the ROC AUC as the standard metric for assessing binary classification. BioData Min., 16.10.1186/s13040-023-00322-4 ↗
27. Singh, S., and Khim, J. (December, January 28). Optimal binary classification beyond accuracy. Proceedings of the 36th International Conference on Neural Information Processing Systems, New Orleans, LA, USA. Article 1325.
28. Perkisas, T. (2024). On Dedicated Anti-Cybercrime Mailboxes Within Financial Institutions: Characterization & Evolution. [Ph.D. Thesis, University of Antwerp].
29. A review on sentiment analysis and emotion detection from text10.1007/s13278-021-00776-6 ↗
30. Are They Different? Affect, Feeling, Emotion, Sentiment, and Opinion Detection in Text10.1109/TAFFC.2014.2317187 ↗
31. Seyeditabari, A., Tabari, N., and Zadrozny, W. (2018). Emotion Detection in Text: A Review. arXiv.
32. HICEM: A High-Coverage Emotion Model for Artificial Emotional Intelligence10.1109/TAFFC.2023.3324902 ↗
33. Four Models of Basic Emotions: A Review of Ekman and Cordaro, Izard, Levenson, and Panksepp and Watt10.1177/1754073911410747 ↗
34. Zhang, F., Chen, J., Tang, Q., and Tian, Y. (2024). Evaluation of emotion classification schemes in social media text: An annotation-based approach. BMC Psychol., 12.10.1186/s40359-024-02008-w ↗
35. Hugging Face (2023, October 24). The AI Community Building the Future. Datasets. Available online: https://huggingface.co/datasets.
36. Öhman, E., Pàmies, M., Kajava, K., and Tiedemann, J. (2020, January 8–13). XED: A Multilingual Dataset for Sentiment Analysis and Emotion Detection. Proceedings of the 28th International Conference on Computational Linguistics, Barcelona, Spain.10.18653/v1/2020.coling-main.575 ↗
37. Demszky, D., Movshovitz-Attias, D., Ko, J., Cowen, A., Nemade, G., and Ravi, S. (2020, January 5–10). GoEmotions: A Dataset of Fine-Grained Emotions. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020), Online.10.18653/v1/2020.acl-main.372 ↗
38. Magician’s Corner: 9. Performance Metrics for Machine Learning Models10.1148/ryai.2021200126 ↗
39. Gupta, A., Anand, A., and Hasija, Y. (2021, January 2–4). Recall-based Machine Learning approach for early detection of Cervical Cancer. Proceedings of the 2021 6th International Conference for Convergence in Technology (I2CT), Maharashtra, India.10.1109/I2CT51068.2021.9418099 ↗
40. Olek, M. (2023). About Evaluation of F1-score for RECENT Relation Extraction System. arXiv.
41. Strapparava, C., and Mihalcea, R. (2007, January 23–24). SemEval-2007 Task 14: Affective Text. Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007), Prague, Czech Republic.10.3115/1621474.1621487 ↗
42. Huang, C., Trabelsi, A., and Zaïane, O. (2019). Seq2Emo for Multi-label Emotion Classification Based on Latent Variable Chains Transformation. arXiv.
43. Abdul-Mageed, M., and Ungar, L. (August, January 30). EmoNet: Fine-Grained Emotion Detection with Gated Recurrent Neural Networks. Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Vancouver, BC, Canada.
44. Liu, C., Osama, M., and De Andrade, A. (2019). DENS: A Dataset for Multi-class Emotion Analysis. arXiv, 6293–6298.10.18653/v1/D19-1656 ↗
45. Davis, J., and Goadrich, M. (2006, January 25–29). The relationship between Precision-Recall and ROC curves. Proceedings of the 23rd International Conference on Machine Learning—ICML’06, Pittsburgh, PA, USA.10.1145/1143844.1143874 ↗
46. Andrikakis, E., Perikos, I., Paraskevas, M., and Hatzilygeroudis, I. (2023, January 23–25). Text Analysis and Recognition of Emotional Content Using Deep Learning Methods and BERT. Proceedings of the 2023 IEEE/ACIS 23rd International Conference on Computer and Information Science (ICIS), Wuxi, China.10.1109/ICIS57766.2023.10210232 ↗
47. An Argument for Basic Emotions10.1080/02699939208411068 ↗
48. Wang, H., Xu, Q., and Zhou, L. (2015). Large unbalanced credit scoring using Lasso-logistic regression ensemble. PLoS ONE, 10.10.1371/journal.pone.0117844 ↗
49. Fang, J. (2023). The role of data imbalance bias in the prediction of protein stability change upon mutation. PLoS ONE, 18.10.1371/journal.pone.0283727 ↗
50. SPACY Industrial (2024, April 20). Strength Natural Language Processing in Python. Available online: https://spacy.io/.
51. A Systematic Review on Stopword Removal Algorithms
52. Mandl, T., Modha, S., Majumder, P., Patel, D., Dave, M., Mandlia, C., and Patel, A. (2019, January 12–15). Overview of the HASOC track at FIRE 2019: Hate Speech and Offensive Content Identification in Indo-European Languages. Proceedings of the 11th Annual Meeting of the Forum for Information Retrieval Evaluation (Fire 2019), Kolkata, India.10.1145/3368567.3368584 ↗
53. Opitz, J., and Burst, S. (2019). Macro F1 and Macro F1. arXiv.
54. Harbecke, D., Hennig, L., and Alt, C. (2022). Why only Micro-F1? Class Weighting of Measures for Relation Classification. arXiv.10.18653/v1/2022.nlppower-1.4 ↗
55. Classification of Imbalanced Data: A Review10.1142/S0218001409007326 ↗
56. Saito, T., and Rehmsmeier, M. (2015). The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS ONE, 10.10.1371/journal.pone.0118432 ↗
57. Joshi, K., Kumar, S., Rawat, J., Kumari, A., Gupta, A., and Sharma, N. (2022, January 23–25). Fraud App Detection of Google Play Store Apps Using Decision Tree. Proceedings of the 2022 2nd International Conference on Innovative Practices in Technology and Management (ICIPTM), Pradesh, India.10.1109/ICIPTM54933.2022.9754207 ↗
58. Automatically extracting cancer disease characteristics from pathology reports into a Disease Knowledge Representation Model10.1016/j.jbi.2008.12.005 ↗
59. Kane, A., Patankar, S., Khose, S., and Kirtane, N. (2022, January 26). Transformer based ensemble for emotion detection. Proceedings of the 12th Workshop on Computational Approaches to Subjectivity, Sentiment & Social Media Analysis, Dublin, Ireland.10.18653/v1/2022.wassa-1.25 ↗
60. Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2018). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv.
61. Rajpurkar, P., Zhang, J., Lopyrev, K., and Liang, P. (2016). SQuAD: 100,000+ Questions for Machine Comprehension of Text. arXiv.10.18653/v1/D16-1264 ↗