Sentiment Analysis of Active and Passive Smokers on Platform X using Naive Bayes SVM
DOI:
https://doi.org/10.59934/jaiea.v6i1.3050Keywords:
Sentiment Analysis; Naïve Bayes; Active Smokers and Passive Smokers; Platform X; Support Vector MachineAbstract
The phenomenon of smoking in Indonesia impacts the health of active smokers and causes concern for passive smokers in public spaces. Social media platform X serves as a venue for the public to express opinions on this issue. This study aims to analyze sentiment characteristics toward active and passive smoker categories, as well as to compare the performance of the Naive Bayes and Support Vector Machine (SVM) algorithms to identify the best model. We collected a dataset of 3,325 Indonesian tweets using Tweet Harvest. The data underwent preprocessing stages (cleansing, case folding, tokenizing, stopword removal, stemming) and were automatically labeled using a custom lexicon-based approach. Text features were transformed using TF-IDF and split into 80% training data and 20% testing data. The analysis results show that the opinions of active smokers are dominated by positive sentiment at 69% (1,036 tweets), while passive smokers are dominated by negative sentiment at 56% (1,024 tweets) in the form of physical complaints like shortness of breath. In model testing, SVM with a linear kernel consistently outperformed Naïve Bayes. For the active smoker category, SVM achieved 88% accuracy compared to Naïve Bayes' 80%. For the passive smoker category, SVM reached 87% accuracy versus Naïve Bayes' 77%. This study concludes that the hyperplane separation approach in SVM is more robust in handling high-dimensional and sparse social media text data.
Downloads
References
Ali, H., & Hendrastuty, N. (2024). COMPARISON OF NAÏVE BAYES CLASSIFIER, SUPPORT VECTOR MACHINE, RANDOM FOREST ALGORITHMS FOR PUBLIC SENTIMENT ANALYSIS OF KIP-K PROGRAM ON TWITTER. Jurnal Teknik Informatika (Jutif), 5(6), 1701–1712. https://doi.org/10.52436/1.jutif.2024.5.6.4030 9
Andri. (2025). MENGHIRUP BAHAYA: PEROKOK AKTIF DAN PASIF SAMA RUGINYA – Fakultas Kesehatan Masyarakat. Https://Fkm.Unair.Ac.Id/2025/11/17/Menghirup-Bahaya-Perokok-Aktif-Dan-Pasif-Sama-Ruginya/. https://fkm.unair.ac.id/2025/11/17/menghirup-bahaya-perokok-aktif-dan-pasif-sama-ruginya/ 3
Khatib Sulaiman, J., Setiyawati, D., Cahyono, N., & Amikom Yogyakarta, U. (2023). Analisa Sentimen Pengguna Sosial Media Twitter Terhadap Perokok di Indonesia. Indonesian Journal of Computer Science Attribution, 12(1), 2023–2262. 6
Larasati, F. A., Ratnawati, D. E., & Hanggara, B. T. (2022). Analisis Sentimen Ulasan Aplikasi Dana dengan Metode Random Forest (Vol. 6, Number 9). http://j-ptiik.ub.ac.id 5
Manurung, J., & Saragih, H. (2024). Performance comparison of naive bayes and support vector machine algorithms in spambot classification in emails. In International Journal of Basic and Applied Science (Vol. 13, Number 3). www.ijobas.pelnus.ac.id 11
Nadira, F. (2025). 10 Negara dengan Jumlah Perokok Terbanyak di Dunia, RI No.1. Https://Www.Cnbcindonesia.Com/Lifestyle/20250812142332-33-657314/10-Negara-Dengan-Jumlah-Perokok-Terbanyak-Di-Dunia-Ri-No1. https://www.cnbcindonesia.com/lifestyle/20250812142332-33-657314/10-negara-dengan-jumlah-perokok-terbanyak-di-dunia-ri-no1 1
Nicanor, G., & Atillo, A. (2025). Performance of Naïve Bayes and Support Vector Machine for solid waste classification in automated sorting systems. Guilbert Nicanor Abiera Atillo. HCMCOUJS-Advances in Computational Structures, 15(2), 17–28. https://doi.org/10.46223/HCMCOUJS
Nugroho, B. S., & Maharani, W. (2024). Support Vector Machine and Naïve Bayes for Personality Classification Based on Social Media Posting Patterns. Building of Informatics, Technology and Science (BITS), 6(3), 1717–1731. https://doi.org/10.47065/bits.v6i3.6411 10
Octaviani, A., & Dewi, P. (2020). Kecerdasan Buatan sebagai Konsep Baru pada Perpustakaan. 4(4), 453–460. 2
Riyanto, D. A. (2025). Hootsuite (We are Social): Data Digital Indonesia 2025 - Dosen, Praktisi, Konsultan, Pembicara/Fasilitator Digital Marketing, Internet marketing, SEO, Technopreneur dan Bisnis Digital. Https://Andi.Link/Hootsuite-We-Are-Social-Data-Digital-Indonesia-2025/.https://andi.link/hootsuite-we-are-social-data-digital-indonesia-2025/ 4
Liu, B., & Cardie, C. (2014). Sentiment Analysis and Opinion Mining. Computational Linguistics, 5(1). https://doi.org/10.1162/COLI 8
Tundo, Eldina, R., Setiawan, K., & Fajri, R. (2024). Sentimen Analisis Penggunaan Rokok dari Opini Pengguna X/Twitter menggunakan Naive Bayes dan SVM. Jurnal Ilmu Komputer. 7
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.








