This project explores the sentiment of Ghanaians on Twitter in the context of the upcoming 2024 general elections. Utilizing advanced sentiment analysis techniques, including natural language processing (NLP) and machine learning models such as Logistic Regression, Random Forest, Naïve Bayes and Support Vector Machines, this work analyzed tweets related to key political issues and candidates to gauge public opinion and its potential impact on voter behavior and election outcomes. The study employed the Tweepy library to collect real-time data from Twitter, facilitating an in-depth understanding of prevailing sentiments among voters. Model evaluation metrics, including accuracy, precision, and recall, revealed that Support Vector Machine model achieved an overall highest accuracy rate of 80%, followed by Random Forest with an accuracy rate of 79.8%, Logistic Regression achieved 78% and lastly, Naïve Bayes model achieved 74%, indicating a robust performance in sentiment classification. Findings indicated a significant correlation between social media discourse and electoral outcomes, highlighting the importance of digital platforms in shaping public perception. This work contributes to the growing body of literature on social media's role in political communication and offers valuable insights for stakeholders in the Ghanaian electoral landscape.
Research Area
Machine Learning: Machine Learning (ML) research in Computer Science and Information Technology focuses on the development of algorithms and models that enable computers to learn from data and improve their performance over time without being explicitly programmed. It is a subset of Artificial Intelligence that uses statistical techniques to give machines the ability to learn patterns, make decisions, and predict outcomes based on data.
Supervised learning, a key area of ML research, involves training models on labeled data, where the input-output relationships are predefined. This method is widely used for tasks such as classification (e.g., spam detection) and regression (e.g., predicting house prices). Unsupervised learning, on the other hand, involves finding hidden patterns in data without predefined labels, with clustering and association being typical applications in areas such as customer segmentation and anomaly detection.
Reinforcement learning is another area of ML that focuses on teaching agents to make decisions by interacting with their environment and receiving feedback in the form of rewards or penalties. It is often applied in robotics, game playing, and autonomous systems, where continuous learning and adaptation are required.
Project Main Objective
To analyze and understand the sentiments of Ghanaians ahead of the 2024 general elections using sentiment analysis techniques.