Machine Learning-Based Analysis of Public Sentiment on Cyber Security Issues via Social Media
- DOI
- 10.2991/978-94-6463-764-9_3How to use a DOI?
- Keywords
- Sentiment Analysis; Cyber Security; VADER; Machine Learning; Public Opinion
- Abstract
Cybersecurity has become a critical issue in today’s digital era. This study aims to analyze public sentiment toward cybersecurity issues on social media using a text mining approach. Data were collected through scraping from Twitter, resulting in 935 tweets containing relevant information about cyber-security. The data were preprocessed by removing punctuation, stopwords, and normalization, followed by sentiment labeling using the VADER method to classify sentiments as positive, neutral, or negative. The analysis was performed using machine learning algorithms, including Naive Bayes, Support Vector Machine (SVM), Random Forest, Logistic Regression, and K-Nearest Neighbors (KNN). Of the total data, 80% were used for training and 20% for testing. The sentiment distribution in the test data was 73 positive, 11 neutral, and 20 negative sentiments. Random Forest achieved the highest accuracy on the training data, while SVM demonstrated superior performance on the test data. Logistic Regression achieved a precision of 68.3%, recall of 76.9%, and F1 Score of 70.8%, with an overall accuracy of 76.9%. The accuracy for other models is as follows: Logistic Regression (77.9%), SVM (77.9%), Random Forest (78.8%), Naive Bayes (75.0%), and KNN (69.1%). The analysis highlights the effectiveness of these models in classifying public sentiments toward cybersecurity, despite challenges posed by imbalanced data distribution.
- Copyright
- © 2025 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 - Basirudin Ansor AU - Muhammad Zainudin Al Amin AU - Maulana Sihdi Habibie AU - Raina Artika Ramadlonia AU - Dhendra Marutho AU - Atika Mutiarachim PY - 2025 DA - 2025/07/30 TI - Machine Learning-Based Analysis of Public Sentiment on Cyber Security Issues via Social Media BT - Proceedings of the 3rd Lawang Sewu International Symposium on Engineering and Applied Sciences (LEWIS-EAS 2024) PB - Atlantis Press SP - 14 EP - 27 SN - 2352-5401 UR - https://doi.org/10.2991/978-94-6463-764-9_3 DO - 10.2991/978-94-6463-764-9_3 ID - Ansor2025 ER -