Conference paper 2024

Twitter Sentiment Analysis with Machine Learning for Political Approval Rating

Lecture Notes in Networks and Systems
Conference · Vol. 909 LNNS · pp. 377-397
Abstract

This study provides an insightful analysis of Peruvian political approval rating sentiment, using Twitter data and applying various ranking algorithms. Despite the challenging context of political instability, the research achieved a high degree of accuracy, with Linear SVC classification leading the way. The detailed breakdown of the results and the evident correlation between tweet sentiment and real-world events provide compelling validation of the chosen methods. The authors’ exploration of various machine learning techniques amplifies the relevance of the study. The research collected 8274 tweets from the @presidenciaperu account, employing API v2 during the month of April 2023, regarding the government’s political approval rating, with the objective of identifying the accuracy of Machine Learning algorithms NB multinomial, NB Bernoulli, Support Vector linear classifier, Logistic regression classifier and KNeighbors classifier from the sentiment analysis of Tweets in Spanish language. Tweets were processed using PLN, words were vectorized with the bag of words algorithm, allowing to build a vocabulary of 5773 tweets with negative (0) and positive (1) polarity in tweets with the support of Python and BETO. Five machine learning sentiment analysis techniques were compared, resulting in an accuracy of 96.3636% (F1Score = 0.98) for the linear SVC, an accuracy of 95.3246% (F1Score = 0.98) for the KNeighbors classifier, an accuracy of 95.2380% (F1Score = 0.98) for the logistic regression classifier, and a tie in accuracy of 94.8051% for NB multinomial and NB Bernoulli. The results indicate that the optimal algorithm was the Support Vector linear classifier with 96.3636% accuracy applied in a Peruvian political approval index environment. © The Author(s), under exclusive license to Springer Nature Switzerland AG 2024.

Keywords

Author Keywords

Machine Learning sentiment analysis twitter Bernoulli NB KNN classifier Linear SVC logistic regression classifier

Index Keywords

Machine learning Machine-learning Learning algorithms Sentiment analysis Social networking (online) Logistic regression Bernoulli Bernoulli NB F1 scores KNN classifier Linear SVC Logistic regression classifier Multinomials Twitter
Author Affiliations
Universidad Tecnológica del Perú, Lima, Lima, Peru
Funding & Acknowledgements
No funding information
References 10 References
1 Asas Komunikasi Untuk Pemimpin Pendidikan Genting Highlans Institut Aminuddin, (2020)
2 Teori Teori Komunikasi, (2005)
3 Kesan Covid 19 Terhadap Kebolehpasaran Graduan Ipt Pelan Tindakan Kepada Pelajar Fakulti Pengajian Quran Sunnah, (2020)
4 undefined
5 J Melayu Sedunia, (2021)
6 Bagaimana Covid 19 Mempengaruhi Kemahiran Berkomunikasi Graduan Pada Masa Depan Dagangnews Com, (2021)
7 Cimatti, Barbara, Definition, development, assessment of soft skills and their role for the quality of organizations and enterprises, International Journal for Quality Research, 10, 1, pp. 97-130, (2016)
8 Educatum Journal of Social Sciences, (2020)
9 International Journal of Educational Research and Technology, (2014)
10 Modul Pembangunan Kemahiran Insaniah Soft Skills Untuk Institusi Pengajian Tinggi Malaysia, (2006)
Quick Actions
Full Text via DOI
Citation Metrics
1
Times Cited (Scopus)

References 10
Document Identifiers