Recognizing sentimental emotions in text by using Machine Learning

Abstract

As one of the fastest and most prominent deep learning technologies being fiddled with today, sentiment analysis is capable of revealing an individual’s true emotions by analyzing their facial speech, text, facial expressions, gestures, and so on. The technology is being constantly used to understand how different individuals feel or react when they are put under certain circumstances or situations. The information obtained from such analyses is then processed to unravel the subject’s sentimental reactions to said circumstances and situations which can further be utilized in a magnitude of ways. While the technology itself is constantly being improved upon, opportunities still exist to make it more efficient. This research aims to use a va riety of machine learning algorithms and language models for sentiment detection in textual data, and understand how each of these algorithms and models approach the problems presented to them through the textual data. This is to be achieved utilizing five models that fall under three pairs namely primitive or simple models featuring TF-IDF and Bag of Words; mid complexity models featuring Naive Bayes; and advanced context-identifying state-of-the-art models namely LSTM and BERT. The datasets for this research include the Spotify App Reviews Dataset and 100K Coursera’s Course Reviews Dataset. We used 10000 samples from these datasets for our research. After running the suggested models, the research aims to discover which of them works best and on which datasets, whether or not there are any similarity patterns between them, and whether or not any of the suggested models provide poor or disappointing results, all of which are provided in descriptive and quantified forms, as well as through graphical representation. For 5 label sentiment classification, Multinomial Naive Bayes gave the highest accuracy score for both the Coursera’s Course Review and LSTM scored highest for Spotify App Review dataset which are 74.81% and 62.7%. For 3 label classification, pretrained BERT gave the highest accuracy score for the Coursera dataset and LSTM gave the highest score for Spotify dataset which are 91.2% and 78.3% respectively. However since our datasets very highly imbalanced, the accuracy score is a poor metric for per formance evaluation of the algorithms so we looked at the f1 scores instead. We have also addressed the imbalance in out datasets by using different bias handling techniques, such as random oversampling of the minority classes. We finally reached the conclusion that both LSTM and BERT performed the best for both datasets after carefully observing the f1 scores for all the class predictions for our algorithms in both cases of sentiment label categorization.

Description

Cataloged from PDF version of thesis.
Includes bibliographical references (pages 67-68).
This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science, 2022.

Keywords

BERT, Bag of Words, TF-IDF, Naive Bayes, LSTM

Citation

Endorsement

Review

Supplemented By

Referenced By