Improving Naïve Bayes Accuracy with Particle Swarm Optimization in Sentiment Analysis of Ibu Kota Nusantara (IKN)

Irma Surya Kumala Idris, Mustofa Mustofa

Abstract


The development of Indonesia's new capital city, Ibu Kota Nusantara (IKN), has sparked extensive public discourse on social media, positioning sentiment analysis as a strategic approach to understanding public opinion. This study assesses the performance of the Naïve Bayes algorithm enhanced through Particle Swarm Optimization (PSO) in classifying public sentiment related to the IKN project, using Indonesian-language comments extracted from the social media platform X. The initial Naïve Bayes model achieved an accuracy of 78.3%, while the PSO-optimized model demonstrated an improved accuracy of 79.7% under optimal parameter settings. These findings indicate the potential of PSO to enhance feature selection effectiveness and reduce classification errors, particularly for positive sentiments. Despite the observed improvements, limitations such as reliance on automated sentiment labeling and challenges posed by linguistic context remain. This study contributes an early exploration of optimization-based methods for public opinion classification and highlights the need for further research involving advanced approaches such as deep learning tailored to the Indonesian language.

Pembangunan Ibu Kota Nusantara (IKN) menimbulkan diskursus publik yang luas di media sosial, menjadikan analisis sentimen sebagai pendekatan strategis untuk memahami opini masyarakat. Studi ini mengevaluasi kinerja algoritma Naïve Bayes yang ditingkatkan menggunakan pendekatan Particle Swarm Optimization (PSO) dalam tugas pengelompokan sentimen publik terhadap proyek IKN, dengan menggunakan data komentar berbahasa Indonesia dari platform media sosial X. Hasil awal dari model Naïve Bayes standar mencatat akurasi sebesar 78,3%, sedangkan setelah proses optimasi dengan PSO, akurasi meningkat menjadi 79,7% pada pengaturan parameter terbaik. Hasil ini memperlihatkan potensi PSO dalam meningkatkan efektivitas seleksi fitur dan mengurangi kesalahan klasifikasi, terutama pada sentimen positif. Meski pendekatan ini menunjukkan perbaikan, keterbatasan seperti ketergantungan pada pelabelan otomatis dan konteks linguistik masih menjadi tantangan. Studi ini memberikan kontribusi awal dalam pengembangan metode klasifikasi opini publik berbasis optimasi, serta mendorong eksplorasi pendekatan lanjutan seperti deep learning untuk konteks bahasa Indonesia.


Keywords


Naïve Bayes; Particle Swarm Optimization; Sentiment Analysis; Nusantara Capital City.

Full Text:

PDF

References


L. Agustino, M. D. Hikmawan, and J. Silas, “Is It Possible for Sustainability? The Case From the New Capital City of Indonesia,” Frontiers in Political Science, vol. 6, 2024, doi: 10.3389/fpos.2024.1362337.

M. A. Kamal, “Prospects for the New Capital City Policy in Law and Economic Perspectives,” Substantive Justice International Journal of Law, vol. 5, no. 1, p. 86, 2022, doi: 10.56087/substantivejustice.v5i1.205.

M. U. Ikfina, “Indonesia’s National Capital Relocation Policy: An Analysis of Political Support in Parliament and the Public Responses on Twitter,” Journal of Governance and Public Policy, vol. 11, no. 1, pp. 1–13, 2024, doi: 10.18196/jgpp.v11i1.17760.

R. Rachmawati et al., “Achieving Sustainable Urban Development for Indonesia’s New Capital City,” International Journal of Sustainable Development and Planning, vol. 19, no. 2, 2024, doi: 10.18280/ijsdp.190204.

A. Nuryadin, L. Subagiyo, N. F. Sulaeman, S. Dinurrohmah, and P. S. Rahmawati, “Investigation of Students’ Pro-Environmental Behavior Around Indonesia’s New Capital City,” International Journal of Evaluation and Research in Education (Ijere), vol. 12, no. 2, p. 594, 2023, doi: 10.11591/ijere.v12i2.24423.

S. I. F. Asfianur, S. Suswanta, R. Al-Hamdi, and Z. Qodir, “Discourse on Moving the New Capital City in East Kalimantan Province a Political Economy Perspective,” Masyarakat Kebudayaan Dan Politik, vol. 36, no. 3, pp. 379–393, 2023, doi: 10.20473/mkp.v36i32023.379-393.

D. Kadewandana and A. Cahyadiputra, “Public Opinion Analysis on Social Media About the Establishment of Indonesia’s New Capital City,” Islamic Communication Journal, vol. 8, no. 2, pp. 229–250, 2023, doi: 10.21580/icj.2023.8.2.18283.

A. K. Darmawan, M. W. A. Wajieh, M. B. Setyawan, T. Yandi, and H. Hoiriyah, “Hoax News Analysis for the Indonesian National Capital Relocation Public Policy With the Support Vector Machine and Random Forest Algorithms,” Journal of Information Systems and Informatics, vol. 5, no. 1, pp. 150–173, 2023, doi: 10.51519/journalisi.v5i1.438.

H. Akeda and M. A. Muslim, “Narrative Policy Analysis: What Is Behind the Movement of Capital City of Indonesia,” Journal of Education Humaniora and Social Sciences (Jehss), vol. 6, no. 2, pp. 664–676, 2023, doi: 10.34007/jehss.v6i2.1930.

H. Herdiawanto, “The Position of the Nusantara Capital City From a National Security Perspective,” Masyarakat Kebudayaan Dan Politik, vol. 36, no. 4, pp. 545–558, 2023, doi: 10.20473/mkp.v36i42023.545-558.

M. H. Tsai and Y. Wang, “Analyzing Twitter Data to Evaluate People’s Attitudes Towards Public Health Policies and Events in the Era of COVID-19,” International Journal of Environmental Research and Public Health, vol. 18, no. 12, p. 6272, 2021, doi: 10.3390/ijerph18126272.

Y. A. Mustofa and I. S. K. Idris, “Ensemble Approach to Sentiment Analysis of Google Play Store App Reviews,” Jambura Journal of Electrical and Electronics Engineering, vol. 6, no. 2, pp. 181–188, 2024, doi: 10.37905/jjeee.v6i2.25184.

W. B. Zulfikar, A. R. Atmadja, and S. F. Pratama, “Sentiment Analysis on Social Media Against Public Policy Using Multinomial Naive Bayes,” Scientific Journal of Informatics, vol. 10, no. 1, pp. 25–34, 2023, doi: 10.15294/sji.v10i1.39952.

N. A. O. Saputri, M. Misinem, and K. Zuhri, “Analysis of Sentiment Based on Opinions From the 2019 Presidential Election,” Jods, vol. 2024, no. 1, 2024, doi: 10.61453/jods.v2024no25.

N. Z. B. Jannah and K. Kusnawi, “Comparison of Naïve Bayes and SVM in Sentiment Analysis of Product Reviews on Marketplaces,” Sinkron, vol. 8, no. 2, pp. 727–733, 2024, doi: 10.33395/sinkron.v8i2.13559.

M. A. Ayu and A. H. Muhendra, “Preprocessing of Slang Words for Sentiment Analysis on Public Perceptions in Twitter,” 2024, doi: 10.5772/intechopen.113725.

W. Ashiq et al., “Roman Urdu Hate Speech Detection Using Hybrid Machine Learning Models and Hyperparameter Optimization,” Scientific Reports, vol. 14, no. 1, 2024, doi: 10.1038/s41598-024-79106-7.

M. M. Dakwah, A. A. Firdaus, F. Furizal, and R. Faresta, “Sentiment Analysis on Marketplace in Indonesia Using Support Vector Machine and Naïve Bayes Method,” Jurnal Ilmiah Teknik Elektro Komputer Dan Informatika, vol. 10, no. 1, p. 39, 2024, doi: 10.26555/jiteki.v10i1.28070.

T. N. Wijaya, R. Indriati, and M. N. Muzaki, “Analisis Sentimen Opini Publik Tentang Undang-Undang Cipta Kerja Pada Twitter,” Jambura Journal of Electrical and Electronics Engineering, vol. 3, no. 2, pp. 78–83, 2021.

A. D. Anggraeni, M. Farhansyah, M. R. P. Hermawan, G. W. Wicaksono, and C. S. K. Aditya, “Comparison of Classification Methods on Twitter Sentiment Analysis of PDAM Tugu Tirta Kota Malang,” Juita Jurnal Informatika, vol. 11, no. 1, p. 67, 2023, doi: 10.30595/juita.v11i1.15485.

I. S. K. Idris, Y. A. Mustofa, and I. Salihi, “Analisis Sentimen Terhadap Penggunaan Aplikasi Shopee Mengunakan Algoritma Support Vector Machine (SVM),” Jambura Journal of Electrical and Electronics Engineering, vol. 5, no. 1, pp. 32–35, 2023, doi: 10.37905/jjeee.v5i1.16830.

R. Setiabudi, N. M. S. Iswari, and A. Rusli, “Enhancing Text Classification Performance by Preprocessing Misspelled Words in Indonesian Language,” Telkomnika (Telecommunication Computing Electronics and Control), vol. 19, no. 4, p. 1234, 2021, doi: 10.12928/telkomnika.v19i4.20369.

R. N. Aufa, S. S. Prasetiyowati, and Y. Sibaroni, “The Effect of Feature Weighting on Sentiment Analysis TikTok Application Using the RNN Classification,” Building of Informatics Technology and Science (Bits), vol. 5, no. 1, 2023, doi: 10.47065/bits.v5i1.3597.

A. R. Isnain, N. S. Marga, and D. Alita, “Sentiment Analysis of Government Policy on Corona Case Using Naive Bayes Algorithm,” Ijccs (Indonesian Journal of Computing and Cybernetics Systems), vol. 15, no. 1, p. 55, 2021, doi: 10.22146/ijccs.60718.

R. Hakiki, A. Pambudi, and Asriyanik, “Classification of Public Sentiment Toward 2024 Presidential Candidates on Social Media Platform X Using Naïve Bayes Algorithm,” J. Of Artif. Intell. And Eng. Appl., vol. 3, no. 2, pp. 551–556, 2024, doi: 10.59934/jaiea.v3i2.422.

Y. Affandi and E. Sugiharti, “Sentiment Analysis of Student on Online Lectured During Covid-19 Pandemic Using K-Means and Naïve Bayes Classifier,” Journal of Advances in Information Systems and Technology, vol. 5, no. 1, pp. 38–49, 2023, doi: 10.15294/jaist.v5i1.64903.

S. Supangat, M. Z. Saringat, and M. Y. F. Rochman, “Predicting Handling Covid-19 Opinion Using Naive Bayes and TF-IDF for Polarity Detection,” Matrik Jurnal Manajemen Teknik Informatika Dan Rekayasa Komputer, vol. 22, no. 2, pp. 173–184, 2023, doi: 10.30812/matrik.v22i2.2227.

A. R. Lubis, M. K. M. Nasution, O. S. Sitompul, and E. M. Zamzami, “The Feature Extraction for Classifying Words on Social Media With the Naïve Bayes Algorithm,” Iaes International Journal of Artificial Intelligence (Ij-Ai), vol. 11, no. 3, p. 1041, 2022, doi: 10.11591/ijai.v11.i3.pp1041-1048.

B. Chanakot and K. Phoksawat, “Analysis of Consumer Sentiments Towards Online Shopping Using Context-Free Grammar and Deep Learning,” Revue D Intelligence Artificielle, vol. 38, no. 1, pp. 193–199, 2024, doi: 10.18280/ria.380119.

J. A. Widians, R. Wardoyo, and S. Hartati, “Feature Selection Based on Chi-Square and Ant Colony Optimization for Multi-Label Classification,” International Journal of Electrical and Computer Engineering (Ijece), vol. 14, no. 3, p. 3303, 2024, doi: 10.11591/ijece.v14i3.pp3303-3312.

W. Dirgantara, F. I. Maulana, Subairi, and R. Arifuddin, “The Performance of Machine Learning Model Bernoulli Naïve Bayes, Support Vector Machine, and Logistic Regression on COVID-19 in Indonesia Using Sentiment Analysis,” Techné Jurnal Ilmiah Elektroteknika, vol. 23, no. 1, pp. 153–162, 2024, doi: 10.31358/techne.v23i1.446.




DOI: https://doi.org/10.37905/jjeee.v7i2.31589

Refbacks

  • There are currently no refbacks.


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

Published by:
Electrical Engineering Department
Faculty of Engineering
State University of Gorontalo
Jalan B.J.Habibie Desa Moutong Kecamatan Tilongkabila Kabupaten Bone Bolango
Telp. 0435-821175; 081340032063
Email: [email protected]/[email protected]

Creative Commons License

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