Sentiment Analysis of Jakarta’s Air Pollution Management Using the Naïve Bayes and SVM Algorithms Based on PSO

Penulis

Kata Kunci:

Sentiment Analysis, Jakarta’s Air Pollution, Naïve Bayes, SVM, PSO Optimization

Abstrak

Air pollution is an increasingly pressing environmental issue in Jakarta, the capital of Indonesia, as well as in other major cities worldwide. Machine learning employing Naïve Bayes Classifier and Support Vector Machine (SVM) algorithms, optimized by Particle Swarm Optimization (PSO), can be applied to analyze public sentiment regarding the handling of air pollution in Jakarta. For this study, researchers collected a public dataset from Twitter comprising 797 tweets. This data encompasses various opinions and assumptions related to Jakarta's air pollution mitigation, which was subsequently pre-processed to ensure data validity. The Naïve Bayes Classifier and SVM algorithms—both established data classification methods—were implemented to construct the sentiment model. These algorithms were then optimized using PSO to enhance their classification accuracy. Based on the training and implementation results of the PSO-optimized models, public sentiment toward the handling of air pollution in Jakarta can be evaluated through the recall values: true negative at 92.12%, true positive at 32.35%, and true neutral at 20.42%. This is further reinforced by the precision values, which indicate predicted negative at 65.09%, predicted positive at 63.22%, and predicted neutral at 56.86%. Based on the accuracy evaluation of the PSO-optimized SVM algorithm (Table 7), this study concludes that current measures to handle air pollution in Jakarta are perceived as ineffective and have minimal impact on mitigating the city's overall air pollution.

Unduhan

Data unduhan tidak tersedia.

Referensi

[1] S. A. Alasadi and W. S. Bhaya, “Review of Data Preprocessing Techniques,” Journal of Engineering and Applie Sciences, vol. 12, no. 16. pp. 4102–4107, 2017.

[2] P. Arsi and R. Waluyo, “Analisis Sentimen Wacana Pemindahan Ibu Kota Indonesia Menggunakan Algoritma Support Vector Machine (SVM),” J. Teknol. Inf. dan Ilmu Komput., vol. 8, no. 1, p. 147, 2021, doi: 10.25126/jtiik.0813944.

[3] P. Arsi, B. A. Kusuma, and A. Nurhakim, “Analisis Sentimen Pindah Ibu Kota Berbasis Naive Bayes Classifier,” J. Inform. Upgris, vol. 7, no. 1, pp. 1–6, 2021, doi: 10.26877/jiu.v7i1.7636.

[4] C. Pramita, “Analisis Sentimen Media Sosial Menggunakan Algoritma Naive Bayes,” J. Dunia Data, vol. 1, no. 5, pp. 1–18, 2024, [Online]. Available: http://www.duniabisnis.org/index.php/duniadata/article/view/91

[5] 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.

[6] B. Xue, M. Zhang, and W. N. Browne, “Particle swarm optimization for feature selection in classification: A multi-objective approach,” IEEE Trans. Cybern., vol. 43, no. 6, pp. 1656–1671, 2013, doi: 10.1109/TSMCB.2012.2227469.

[7] M. Nahdhudin, N. Cahyo, H. Wibowo, M. R. Handayani, and K. Umam, “Klasifikasi Sentimen Masyarakat Terhadap Aplikasi Tiktok Menggunakan Algoritma Naive Bayes,” vol. 1, no. 3, pp. 107–112, 2025.

[8] J. He and H. Guo, “A modified particle swarm optimization algorithm,” Proc. 29th Chinese Control Decis. Conf. CCDC 2017, vol. 11, no. 10, pp. 6659–6663, 2017, doi: 10.1109/CCDC.2017.7978374.

[9] A. R. Purnajaya, “Evaluating Resampling Methods for Imbalanced Necrosis Classification on CT Scans,” vol. 2, no. 2, 2026, doi: 10.65258/jutekom.v2.i2.56.

[10] M. S. & K. K. B. Surbhi Bhatia, “Sentiment Analysis and Mining of Opinions,” Stud. Big Data, vol. 30, pp. 503–523, 2018, doi: 10.1007/978-3-319-60435-0_20.

[11] N. Nikentari, H. Kurniawan, N. Ritha, D. Kurniawan, U. Maritim, and R. Ali, “Particle Swarm Optimization Untuk Prediksi Pasang Surut Air Optimization of Backpropagation Artificial Neural Network With Particle Swarm Optimization To Predict Tide Level,” J. Teknol. Inf. dan Ilmu Komput., vol. 5, no. 5, pp. 605–612, 2019, doi: 10.25126/jtiik2018551055.

[12] A. Halim and Andri Safuwan, “Analisis Sentimen Opini Warganet Twitter Terhadap Tes Screening Genose Pendeteksi Virus Covid-19 Menggunakan Metode Naïve Bayes Berbasis Particle Swarm Optimization,” J. Inform. Teknol. dan Sains, vol. 5, no. 1, pp. 170–178, 2023, doi: 10.51401/jinteks.v5i1.2229.

[13] A. Santoso, A. Nugroho, and A. S. Sunge, “Analisis Sentimen Tentang Mobil Listrik Dengan Metode Support Vector Machine Dan Feature Selection Particle Swarm Optimization,” J. Pract. Comput. Sci., vol. 2, no. 1, pp. 24–31, 2022, doi: 10.37366/jpcs.v2i1.1084.

[14] R. Darmawan, I. Indra, and A. Surahmat, “Optimalisasi Support Vector Machine (SVM) Berbasis Particle Swarm Optimization (PSO) Pada Analisis Sentimen Terhadap Official Account Ruang Guru di Twitter,” J. Kaji. Ilm., vol. 22, no. 2, pp. 143–152, 2022, doi: 10.31599/jki.v22i2.1130.

[15] Florin Gorunescu, Data Mining: Concepts, Models and Techniques, vol. 12. 2011. doi: 10.1007/978-3-642-19721-5_5.

[16] E. Indrayuni, “Analisa Sentimen Review Hotel Menggunakan Algoritma Support Vector Machine Berbasis Particle Swarm Optimization,” J. Evolusi Vol. 4 Nomor 2 - 2016, vol. 4, no. 2, pp. 20–27, 2016.

Diterbitkan

2026-09-07

Terbitan

Bagian

Articles

Cara Mengutip

Sentiment Analysis of Jakarta’s Air Pollution Management Using the Naïve Bayes and SVM Algorithms Based on PSO. (2026). International Journal of Information Technology Science (INTENS), 1(3), 29-38. https://journal.futuresciencepress.com/index.php/intens/article/view/76