Emotions Detection from Social Media Text Using Machine Learning

Pradeep Kumar Roy, Jitender Choudhary · 2023

Emotional states of individuals, often known as moods, play a crucial role in how thoughts, ideas, and views are expressed, which in turn affects attitudes and behavior. Millions of people use social media platforms like Twitter, Facebook, and others to broadcast their daily activities or report on an external incident of interest. Anger, contempt, fear, happiness, sadness, and surprise are just a few of the emotions that can be identified and recognized through the representation of texts in the process of emotion analysis. Applications for emotion detection could include: measuring the level of happiness among our population. Computers have long been used in decision-making, but traditionally have relied on factual information. Emotions are an integral part of human life and, above all, have a strong influence on decision-making. This research aims to design a system than can recognize emotions from texts. For each format of the text, the machine identifies the specific emotions that the text expresses, such as happiness, sadness, anger, and joy. Therefore, four supervised machine learning classification algorithms such as Random Forest, Support Vector Machine, Decision Tree, and Random Forest with hyperparameter tuning investigated. Random Forest with hyperparameters resulted in the best performance. The model has been successfully interpreted, analyzed, and understands human emotions using text-based emotion prediction system with an average accuracy of 86.30% for the best case. Keywords: Emotion detection, machine learning, social media, ensemble learning, classification Contents

Read the paper · More papers on PaperTik