This research investigates the effectiveness of transformer-based models, particularly DistilBERT, in emotion classification compared to traditional machine learning and deep learning approaches. A dataset of 20,000 labeled text samples across 6 emotion categories was utilized, divided into training (16,000 samples), validation (2,000), and test (2,000) sets. Performance was evaluated using accuracy, precision, recall, and F1-score. DistilBERT achieved superior accuracy (92%), outperforming models like Random Forest (86–88%), SVM (87%), and LSTM (88%), demonstrating its ability to capture contextual language patterns through self-attention and pre-training. While excelling in detecting Joy (94% precision, 96% recall) and Sadness, the model struggled with Love and Surprise (test F1-scores of 72% and 85% precision, respectively), highlighting challenges in recognizing nuanced or under-represented emotions. The results underscore DistilBERT’s efficiency and scalability for emotion detection tasks, though imbalances in class distribution and contextual ambiguity in certain emotions warrant further optimization.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Understanding Textual Emotions by Evaluating NLP Model Performance

  • Dhruv Patel,
  • Krish Soni,
  • Hardikkumar Jayswal,
  • Nilesh Dubey,
  • Jitendra Chaudhari,
  • Amit Nayak,
  • Rishi Patel

摘要

This research investigates the effectiveness of transformer-based models, particularly DistilBERT, in emotion classification compared to traditional machine learning and deep learning approaches. A dataset of 20,000 labeled text samples across 6 emotion categories was utilized, divided into training (16,000 samples), validation (2,000), and test (2,000) sets. Performance was evaluated using accuracy, precision, recall, and F1-score. DistilBERT achieved superior accuracy (92%), outperforming models like Random Forest (86–88%), SVM (87%), and LSTM (88%), demonstrating its ability to capture contextual language patterns through self-attention and pre-training. While excelling in detecting Joy (94% precision, 96% recall) and Sadness, the model struggled with Love and Surprise (test F1-scores of 72% and 85% precision, respectively), highlighting challenges in recognizing nuanced or under-represented emotions. The results underscore DistilBERT’s efficiency and scalability for emotion detection tasks, though imbalances in class distribution and contextual ambiguity in certain emotions warrant further optimization.