Proceedings of the International Conference on Innovation & Entrepreneurship in Computing, Engineering & Science Education (InvENT 2024)

Analysis and Visualization of Political Sentiments on Twitter Using Machine Learning Algorithms

Authors
Adlina Najihah Mohd Pouzi1, Shuzlina Abdul-Rahman2, Siti Sakira Kamaruddin3, Norlina Mohd Sabri4, *
1Tata Consultancy Services, Axiata Tower 9, Kuala Lumpur Sentral, Malaysia
2Research Initiative Group of Intelligent Systems, College of Computing, Informatics and Mathematics, Universiti Teknologi MARA Selangor, Shah Alam, Malaysia
3School of Computing, Universiti Utara Malaysia, Sintok, Malaysia
4College of Computing, Informatics and Mathematics, Universiti Teknologi MARA Cawangan Terengganu, Terengganu, Malaysia
*Corresponding author. Email: norli097@uitm.edu.my
Corresponding Author
Norlina Mohd Sabri
Available Online 1 December 2024.
DOI
10.2991/978-94-6463-589-8_26How to use a DOI?
Keywords
Sentiment Analysis; Machine Learning; Politics
Abstract

The Malaysian political system is a constitutional monarchy with a federal parliamentary democracy. In the era of technological advancement, social media has become a huge part of human life. The relationship between politicians and the public has progressed through the use of social media, where they connect with the citizens and build personal connections with them. However, the people’s voice remains in the grey where demands and needs are not easily identified. It is critical for the government to understand public opinions to define strategies and make decisions. Hence, in this work, sentiment analysis has been implemented by focusing on the public sentiments toward the Malaysian government, specifically on the governance of the Perikatan Nasional political party during the Covid-19 pandemic. In this study, a corpus-based lexicon method was used to identify the positive, negative and neutral labels for the training data. These labels were used in the machine learning models, which were the Naive Bayes, Support Vector Machine and Logistic Regression. Furthermore, the models’ performance has been compared and the results have shown that Naive Bayes has surpassed other models with the highest performance in accuracy, precision and F1- score. The main contribution of this study is that this research has successfully analyzed the relative performance of three machine learning algorithms for the political sentiments. The results of the sentiment analysis were visualized using Power BI for a clear view with a deeper understanding.

Copyright
© 2024 The Author(s)
Open Access
Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License (http://creativecommons.org/licenses/by-nc/4.0/), which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

Download article (PDF)

Volume Title
Proceedings of the International Conference on Innovation & Entrepreneurship in Computing, Engineering & Science Education (InvENT 2024)
Series
Advances in Computer Science Research
Publication Date
1 December 2024
ISBN
978-94-6463-589-8
ISSN
2352-538X
DOI
10.2991/978-94-6463-589-8_26How to use a DOI?
Copyright
© 2024 The Author(s)
Open Access
Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License (http://creativecommons.org/licenses/by-nc/4.0/), which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

Cite this article

TY  - CONF
AU  - Adlina Najihah Mohd Pouzi
AU  - Shuzlina Abdul-Rahman
AU  - Siti Sakira Kamaruddin
AU  - Norlina Mohd Sabri
PY  - 2024
DA  - 2024/12/01
TI  - Analysis and Visualization of Political Sentiments on Twitter Using Machine Learning Algorithms
BT  - Proceedings of the International Conference on Innovation & Entrepreneurship in Computing, Engineering & Science Education (InvENT 2024)
PB  - Atlantis Press
SP  - 287
EP  - 297
SN  - 2352-538X
UR  - https://doi.org/10.2991/978-94-6463-589-8_26
DO  - 10.2991/978-94-6463-589-8_26
ID  - Pouzi2024
ER  -