Emotion Detection from
Tweets Using Ensemble Models
Team
Prakash Babu Yandrapati Santoshachandra Rao Karanam
Parnem Ruchith Reddy Srihith Rachakonda
Yatarla Tharun Reddy Alla Bharath Teja
GITAM University Hyderabad
2024 International Conference on Computational Intelligence for
Green and Sustainable Technologies
06/08/2024 Emotion Detection from Tweets Using Ensemble Mode
ls
2
Table of contents
Introduction
Literature Survey
Methodology
Results analysis
Conclusion
06/08/2024 Emotion Detection from Tweets Using Ensemble Mode
ls
3
Introduction
Text emotion analysis, also known as sentiment analysis, determines
the emotional tone behind a body of text. It uses natural language
processing (NLP) and machine learning to extract subjective
information.
06/08/2024 Emotion Detection from Tweets Using Ensemble Mode
ls
4
Introduction Cont.…
 Applications: Used in customer feedback analysis, social media monitoring, brand
reputation management, and market research. It helps organizations understand public
opinion, gauge customer satisfaction, and improve products and services.
 Techniques: Common techniques include rule-based approaches, machine learning
models, and deep learning methods. Rule-based use dictionaries and linguistic rules, while
machine learning relies on training data to learn patterns.
06/08/2024 Emotion Detection from Tweets Using Ensemble Mode
ls
5
Introduction Cont.…
 Challenges: Faces challenges like handling sarcasm, irony, and ambiguous language.
Context plays a significant role, making it difficult to accurately predict emotions without
understanding the surrounding context.
 Future Trends: Advances in NLP and AI are improving text emotion analysis accuracy
and reliability. Future trends include nuanced emotion understanding, cross-lingual
analysis, and real-time emotion detection.
06/08/2024 Emotion Detection from Tweets Using Ensemble Mode
ls
6
Literature Survey
SNo Author & Year Title Methodology Remarks
1 Poria et al., 2016
Aspect Extraction for Opinion Mining with a Deep
Convolutional Neural Network
Deep convolutional
neural network (CNN)
Effective for aspect-
based sentiment analysis
2 Felbo et al., 2017 Using Millions of Emoji Occurrences to Learn Any-
Domain Representations for Detecting Sentiment,
Emotion, and Sarcasm
Deep learning with emoji-
based supervised
learning
Leveraged large-scale
emoji data for emotion
detection
3 Yadollahi et al.,
2017
Current State of Text Sentiment Analysis from
Opinion to Emotion Mining
Survey of sentiment
analysis techniques from
opinion mining to
emotion detection
Explored the evolution
from sentiment to
emotion analysis
4 Zhang et al., 2018 Deep Learning for Sentiment Analysis: A Survey Review of deep learning
methods, including CNNs
and RNNs
Comprehensive overview
of deep learning
approaches
5 Zhang et al., 2019 Sentiment Analysis: A Combined Approach Combined machine
learning and lexicon-
based methods
Improved accuracy by
integrating different
techniques
06/08/2024 Emotion Detection from Tweets Using Ensemble Mode
ls
7
Literature Survey Cont.…
SNo Author & Year Title Methodology Remarks
6 Wang et al., 2020 HULK: An Energy-Efficient Heterogeneous
Accelerator for Text Analysis via Convolutional
Recurrent Networks
Combination of
convolutional neural
networks (CNNs) and
recurrent neural
networks (RNNs)
Highlighted efficiency in
emotion analysis
computation
7 Xia et al., 2021 Sentiment and Emotion Classification
with Multi-Task Learning Multi-task
learning approach
combining sentiment and
emotion classification
tasks
Enhanced performance
by leveraging shared
representations
8
Liu et al., 2022 Transformer-based Model for Sentiment Analysis Transformer-based
models (e.g., BERT,
RoBERTa)
Achieved state-of-the-art
results in various
sentiment tasks
9 Chen et al., 2023 Emotion Detection in Text Using Graph Neural
Networks
Graph neural networks
(GNNs) for capturing
relationships between
words
Improved accuracy in
detecting nuanced
emotions
10 Patel & Kumar,
2024
Real-time Emotion Analysis in Social Media: Trends
and Challenges
Real-time processing and
analysis of social media
data using deep learning
Addressed challenges in
scalability and real-time
application
06/08/2024 8
Methodology
Data Processing:
• Removing the URL and other characters: Eliminating URLs and non-alphanumeric characters ensures cleaner
text
data for subsequent analysis.
• Remove Punctuations: Stripping away punctuation marks from the text helps in simplifying the data and
removing noise.
• Remove Stop Words: Removing common stop words such as "the," "and," "is" helps in focusing on meaningful
content.
• Normalization of the data: Normalizing the text data involves converting all words to lowercase.
• Lemmatization: Lemmatization reduces words to their base or dictionary form.
• Stemming: Stemming is the process of eliminating suffixes from words in order to get to their basic form.
Emotion Detection from Tweets Using Ensemble
Models
06/08/2024 9
Methodology Cont.…
Tokenization:
Tf-idf (Term Frequency-Inverse Document Frequency): The Tf-idf value indicates how significant a term is
in a given text in comparison to the entire corpus. It gives more weight to words that are common in a
single document but rare in the corpus as a whole.
Stylistic Feature (CV): Count Vectorization (CV), which stands for the frequency of each word in the text
data, is used to extract stylistic elements.
Sentiment Feature (Glove): In terms of sentiment characteristics, GloVe embeddings are utilized. These
embeddings capture the semantic associations between words by analyzing their co-occurrence statistics.
Tf-Idf + S + SE: This combination integrates Tf-idf, stylistic features, and sentiment features to leverage
both term importance and semantic information in the text data.
Emotion Detection from Tweets Using Ensemble
Models
06/08/2024 10
Methodology Cont.…
Models:
Random Forest: Ensemble learning method that constructs multiple decision trees
during training and outputs the mode of the classes (classification) or mean prediction
(regression) of the individual trees.
MLP (Multilayer Perceptron): A type of artificial neural network composed of multiple
layers of nodes, where each node is a neuron that uses non-linear activation functions.
LightGBM: Gradient boosting framework that uses tree-based learning algorithms and
is designed for efficiency, supporting large datasets and high-dimensional features.
Emotion Detection from Tweets Using Ensemble
Models
06/08/2024 11
Methodology Cont.…
The proposed approach employs ensemble learning
techniques and a unique feature representation
method to improve emotion recognition accuracy
using user-generated Twitter data. To build input
representations using stylistic, sentimental, and
language elements retrieved from tweets, the system
employs a Genetic Algorithm (GA). A weighted
average soft-voting classifier that combines MLP,
random forest, and LGBM classifiers is then used with
the input representation.
Emotion Detection from Tweets Using Ensemble
Models
06/08/2024 12
Results Analysis
Emotion Detection from Tweets Using Ensemble
Models
Classifier Precision Recall F1-Score Accuracy
KNN 72 68 70 69
Decision Tree 75 70 72 71
Random Forest 82 78 80 79
XGBoost 85 81 83 82
SVM 80 77 78 78
RF + DT 83 79 81 80
XGBoost + DT 86 82 84 83
SVM + DT 81 78 79 78
RF + XGBoost 88 84 86 85
RF + SVM 83 79 81 80
XGBoost + SVM 87 83 85 84
RF + XGBoost +
SVM
89 85 87 86
Voting Classifier
(DT + AdaBoost)
84 80 82 81
Avg Soft-Voting
Classifier (RF +
MLP + LGBM)
95 95 96 98
06/08/2024 13
Conclusion
Our study introduces a novel emotion identification method using SSEL, integrating
tweet stylistic, emotional, and language elements with a Genetic Algorithm for feature
compression. We applied a weighted average Soft-voting classifier combining MLP,
Random Forest, and LBGM to categorize tweets into six emotional categories,
surpassing traditional classifiers and ensemble methods on a Twitter dataset. Our
approach set a new benchmark in precision, recall, F1-score, and accuracy, with
ensemble techniques enhancing performance by 98%. Future research will explore
categorical and multi-emotion models, and validate our method across diverse user
groups for real-world applicability.
Emotion Detection from Tweets Using Ensemble
Models

Emotion Detection from Tweets Using Ensemble Models (1).pptx

  • 1.
    Emotion Detection from TweetsUsing Ensemble Models Team Prakash Babu Yandrapati Santoshachandra Rao Karanam Parnem Ruchith Reddy Srihith Rachakonda Yatarla Tharun Reddy Alla Bharath Teja GITAM University Hyderabad 2024 International Conference on Computational Intelligence for Green and Sustainable Technologies
  • 2.
    06/08/2024 Emotion Detectionfrom Tweets Using Ensemble Mode ls 2 Table of contents Introduction Literature Survey Methodology Results analysis Conclusion
  • 3.
    06/08/2024 Emotion Detectionfrom Tweets Using Ensemble Mode ls 3 Introduction Text emotion analysis, also known as sentiment analysis, determines the emotional tone behind a body of text. It uses natural language processing (NLP) and machine learning to extract subjective information.
  • 4.
    06/08/2024 Emotion Detectionfrom Tweets Using Ensemble Mode ls 4 Introduction Cont.…  Applications: Used in customer feedback analysis, social media monitoring, brand reputation management, and market research. It helps organizations understand public opinion, gauge customer satisfaction, and improve products and services.  Techniques: Common techniques include rule-based approaches, machine learning models, and deep learning methods. Rule-based use dictionaries and linguistic rules, while machine learning relies on training data to learn patterns.
  • 5.
    06/08/2024 Emotion Detectionfrom Tweets Using Ensemble Mode ls 5 Introduction Cont.…  Challenges: Faces challenges like handling sarcasm, irony, and ambiguous language. Context plays a significant role, making it difficult to accurately predict emotions without understanding the surrounding context.  Future Trends: Advances in NLP and AI are improving text emotion analysis accuracy and reliability. Future trends include nuanced emotion understanding, cross-lingual analysis, and real-time emotion detection.
  • 6.
    06/08/2024 Emotion Detectionfrom Tweets Using Ensemble Mode ls 6 Literature Survey SNo Author & Year Title Methodology Remarks 1 Poria et al., 2016 Aspect Extraction for Opinion Mining with a Deep Convolutional Neural Network Deep convolutional neural network (CNN) Effective for aspect- based sentiment analysis 2 Felbo et al., 2017 Using Millions of Emoji Occurrences to Learn Any- Domain Representations for Detecting Sentiment, Emotion, and Sarcasm Deep learning with emoji- based supervised learning Leveraged large-scale emoji data for emotion detection 3 Yadollahi et al., 2017 Current State of Text Sentiment Analysis from Opinion to Emotion Mining Survey of sentiment analysis techniques from opinion mining to emotion detection Explored the evolution from sentiment to emotion analysis 4 Zhang et al., 2018 Deep Learning for Sentiment Analysis: A Survey Review of deep learning methods, including CNNs and RNNs Comprehensive overview of deep learning approaches 5 Zhang et al., 2019 Sentiment Analysis: A Combined Approach Combined machine learning and lexicon- based methods Improved accuracy by integrating different techniques
  • 7.
    06/08/2024 Emotion Detectionfrom Tweets Using Ensemble Mode ls 7 Literature Survey Cont.… SNo Author & Year Title Methodology Remarks 6 Wang et al., 2020 HULK: An Energy-Efficient Heterogeneous Accelerator for Text Analysis via Convolutional Recurrent Networks Combination of convolutional neural networks (CNNs) and recurrent neural networks (RNNs) Highlighted efficiency in emotion analysis computation 7 Xia et al., 2021 Sentiment and Emotion Classification with Multi-Task Learning Multi-task learning approach combining sentiment and emotion classification tasks Enhanced performance by leveraging shared representations 8 Liu et al., 2022 Transformer-based Model for Sentiment Analysis Transformer-based models (e.g., BERT, RoBERTa) Achieved state-of-the-art results in various sentiment tasks 9 Chen et al., 2023 Emotion Detection in Text Using Graph Neural Networks Graph neural networks (GNNs) for capturing relationships between words Improved accuracy in detecting nuanced emotions 10 Patel & Kumar, 2024 Real-time Emotion Analysis in Social Media: Trends and Challenges Real-time processing and analysis of social media data using deep learning Addressed challenges in scalability and real-time application
  • 8.
    06/08/2024 8 Methodology Data Processing: •Removing the URL and other characters: Eliminating URLs and non-alphanumeric characters ensures cleaner text data for subsequent analysis. • Remove Punctuations: Stripping away punctuation marks from the text helps in simplifying the data and removing noise. • Remove Stop Words: Removing common stop words such as "the," "and," "is" helps in focusing on meaningful content. • Normalization of the data: Normalizing the text data involves converting all words to lowercase. • Lemmatization: Lemmatization reduces words to their base or dictionary form. • Stemming: Stemming is the process of eliminating suffixes from words in order to get to their basic form. Emotion Detection from Tweets Using Ensemble Models
  • 9.
    06/08/2024 9 Methodology Cont.… Tokenization: Tf-idf(Term Frequency-Inverse Document Frequency): The Tf-idf value indicates how significant a term is in a given text in comparison to the entire corpus. It gives more weight to words that are common in a single document but rare in the corpus as a whole. Stylistic Feature (CV): Count Vectorization (CV), which stands for the frequency of each word in the text data, is used to extract stylistic elements. Sentiment Feature (Glove): In terms of sentiment characteristics, GloVe embeddings are utilized. These embeddings capture the semantic associations between words by analyzing their co-occurrence statistics. Tf-Idf + S + SE: This combination integrates Tf-idf, stylistic features, and sentiment features to leverage both term importance and semantic information in the text data. Emotion Detection from Tweets Using Ensemble Models
  • 10.
    06/08/2024 10 Methodology Cont.… Models: RandomForest: Ensemble learning method that constructs multiple decision trees during training and outputs the mode of the classes (classification) or mean prediction (regression) of the individual trees. MLP (Multilayer Perceptron): A type of artificial neural network composed of multiple layers of nodes, where each node is a neuron that uses non-linear activation functions. LightGBM: Gradient boosting framework that uses tree-based learning algorithms and is designed for efficiency, supporting large datasets and high-dimensional features. Emotion Detection from Tweets Using Ensemble Models
  • 11.
    06/08/2024 11 Methodology Cont.… Theproposed approach employs ensemble learning techniques and a unique feature representation method to improve emotion recognition accuracy using user-generated Twitter data. To build input representations using stylistic, sentimental, and language elements retrieved from tweets, the system employs a Genetic Algorithm (GA). A weighted average soft-voting classifier that combines MLP, random forest, and LGBM classifiers is then used with the input representation. Emotion Detection from Tweets Using Ensemble Models
  • 12.
    06/08/2024 12 Results Analysis EmotionDetection from Tweets Using Ensemble Models Classifier Precision Recall F1-Score Accuracy KNN 72 68 70 69 Decision Tree 75 70 72 71 Random Forest 82 78 80 79 XGBoost 85 81 83 82 SVM 80 77 78 78 RF + DT 83 79 81 80 XGBoost + DT 86 82 84 83 SVM + DT 81 78 79 78 RF + XGBoost 88 84 86 85 RF + SVM 83 79 81 80 XGBoost + SVM 87 83 85 84 RF + XGBoost + SVM 89 85 87 86 Voting Classifier (DT + AdaBoost) 84 80 82 81 Avg Soft-Voting Classifier (RF + MLP + LGBM) 95 95 96 98
  • 13.
    06/08/2024 13 Conclusion Our studyintroduces a novel emotion identification method using SSEL, integrating tweet stylistic, emotional, and language elements with a Genetic Algorithm for feature compression. We applied a weighted average Soft-voting classifier combining MLP, Random Forest, and LBGM to categorize tweets into six emotional categories, surpassing traditional classifiers and ensemble methods on a Twitter dataset. Our approach set a new benchmark in precision, recall, F1-score, and accuracy, with ensemble techniques enhancing performance by 98%. Future research will explore categorical and multi-emotion models, and validate our method across diverse user groups for real-world applicability. Emotion Detection from Tweets Using Ensemble Models