Sentiment Analysis of Nigerian Opinions Using Logistic Regression and Random Forest Algorithms: A Comparative Study

Victor Mfon Abia *

Department of Electrical and Electronics Engineering, Akwa Ibom State University, Nigeria.

E. Henry Johnson

Department of Electrical and Electronics Engineering, Akwa Ibom State University, Nigeria.

Akaninyene B. Obot

Akwa Ibom State University, Nigeria.

*Author to whom correspondence should be addressed.


Abstract

This study investigates the efficacy of Logistic Regression and Random Forest models in sentiment analysis using Nigerian-based datasets, namely "Gangs of Lagos" and "PeterObi Politics." Sentiment analysis, a vital component of Natural Language Processing (NLP), plays a crucial role in understanding public opinion and sentiment trends, particularly in the context of Nigerian socio-political discourse. Leveraging machine learning techniques, the study examines the performance of these models in predicting sentiment classes, including positive, negative, and neutral sentiments, within the datasets. The findings shed light on the strengths and limitations of Logistic Regression and Random Forest in discerning sentiment nuances prevalent in Nigerian language expressions with Logistic Regression outperforming Random Forest in both cases. This research contributes to the advancement of sentiment analysis methodologies tailored to Nigerian linguistic and cultural contexts, with implications for various applications, including social media monitoring, political analysis, and market research.

Keywords: Natural language processing, machine learning, logistic regression, random forest, Nigeria


How to Cite

Abia, Victor Mfon, E. Henry Johnson, and Akaninyene B. Obot. 2024. “Sentiment Analysis of Nigerian Opinions Using Logistic Regression and Random Forest Algorithms: A Comparative Study”. Journal of Engineering Research and Reports 26 (10):27-40. https://doi.org/10.9734/jerr/2024/v26i101287.