Enhancing Machine Learning Algorithms Using Particle Swarm Optimization (PSO) to Analyze Coffeeshops in Padang City

Main Article Content

Ilmawati
Nadya Alinda Rahmi
Rahmatia Wulan Dari

Abstract

 Sentiment analysis of customer reviews is a crucial component in understanding consumer perception of coffeeshop services, especially in Padang City. This study aims to enhance text classification performance by employing two machine learning algorithms, Support Vector Machine (SVM) and Naïve Bayes (NB) and optimizing them using Particle Swarm Optimization (PSO). To address data imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied. The dataset consists of customer reviews categorized into three sentiment classes: negative, neutral, and positive. Evaluation results indicate that the optimized SVM+PSO model achieved the highest accuracy of 78.57%, while NB+PSO achieved 73.21%. The implementation of PSO successfully improved the accuracy and f1-score compared to baseline models. This study demonstrates that combining SMOTE and PSO can significantly enhance the performance of multi-class sentiment classification in local business domains such as coffeeshops

Article Details

Section
Articles

References

[1] S. U. Hassan, J. Ahamed, and K. Ahmad, “Analytics of machine learning-based algorithms for text classification,” Sustainable Operations and Computers, vol. 3, pp. 238–248, Jan. 2022, doi: 10.1016/j.susoc.2022.03.001.
[2] Y. A. Singgalen, “Performance Evaluation of Sentiment Classification Models: A Comparative Study of NBC, SVM, and DT with SMOTE,” Media Online, vol. 4, no. 5, pp. 2539–2548, Apr. 2024, doi: 10.30865/klik.v4i5.1827.
[3] S. V RamaKrishna Reddy, D. V L N Somayajulu, and A. R. Dani, “Classification of Movie Reviews Using Complemented Naive Bayesian Classifier,” International Journal of Intelligent Computing Research (IJICR), vol. 2, no. 3, pp. 148–153, 2011, doi: 10.20533/ijicr.2042.4655.2011.0019.
[4] A. Munawaroh and R. Ridhoi, “Sentiment Analysis dengan Naïve Bayes Berbasis Orange Terhadap Resiko Pembangunan IKN,” Jurnal Mahasiswa Teknik Informatika, vol. 8, no. 1, pp. 587–592, Feb. 2024, doi: 10.36040/jati.v8i1.8454.
[5] P. Fremmuzar and A. Baita, “Uji Kernel SVM dalam Analisis Sentimen Terhadap Layanan Telkomsel di Media Sosial Twitter,” Komputika : Jurnal Sistem Komputer, vol. 12, no. 2, pp. 57–66, Sep. 2023, doi: 10.34010/komputika.v12i2.9460.
[6] R. A. Sitorus and I. Zufria, “Application of the Naïve Bayes Algorithm in Sentiment Analysis of Using the Shopee Application on the Play Store,” Digital Zone, vol. 15, no. 1, pp. 53–65, 2024, doi: 10.31849/digitalzone.v15i1.19828.
[7] G. R. Ditami, E. F. Ripanti, and H. Sujaini, “Implementasi Support Vector Machine untuk Analisis Sentimen Terhadap Pengaruh Program Promosi Event Belanja pada Marketplace,” JEPIN (Jurnal Edukasi dan Penelitian Informatika), vol. 8, no. 3, pp. 508–516, Dec. 2022, doi: 10.26418/jp.v8i3.56478.
[8] M. M. R. Mubarak, Y. H. Chrisnanto, and P. N. Sabrina, “Implementation of Random Forest Using Smote and Smoteenn in Customer Churn Classification in E-Commerce,” Enrichment: Journal of Multidisciplinary Research and Development, vol. 1, no. 8, pp. 463–477, Nov. 2023, doi: 10.55324/enrichment.v1i8.69.
[9] N. W. Susanto and H. Suparwito, “SVM-PSO Algorithm for Tweet Sentiment Analysis #BesokSenin,” Indonesian Journal of Information Systems (IJIS), vol. 6, no. 1, pp. 36–47, 2023, doi: 10.24002/ijis.v6i1.7551.
[10] Y. Zhou, N. Wang, and W. Xiang, “Clustering Hierarchy Protocol in Wireless Sensor Networks Using an Improved PSO Algorithm,” IEEE Access, vol. 5, pp. 2241–2253, 2017, doi: 10.1109/ACCESS.2016.2633826.
[11] R. Wati, S. Ernawati, and I. Maryani, “Optimasi Parameter Pso Berbasis Svm Untuk Analisis Sentimen Review Jasa Maskapai Penerbangan,” Evolusi: Jurnal Sains dan Manajemen, vol. 8, no. 2, pp. 64–71, 2020, doi: 10.31294/evolusi.v8i2.9248.
[12] M. K. Anam, S. Defit, Haviluddin, L. Efrizoni, and M. B. Firdaus, “Early Stopping on CNN-LSTM Development to Improve Classification Performance,” Journal of Applied Data Sciences, vol. 5, no. 3, pp. 1175–1188, 2024, doi: 10.47738/jads.v5i3.312.
[13] R. S. Putra, W. Agustin, M. K. Anam, L. Lusiana, and S. Yaakub, “The Application of Naïve Bayes Classifier Based Feature Selection on Analysis of Online Learning Sentiment in Online Media,” Jurnal Transformatika, vol. 20, no. 1, pp. 44–56, Jul. 2022, doi: 10.26623/transformatika.v20i1.5144.
[14] M. K. Anam, S. Sumijan, K. Karfindo, and M. B. Firdaus, “Comparison Analysis of HSV Method, CNN Algorithm, and SVM Algorithm in Detecting the Ripeness of Mangosteen Fruit Images,” Indonesian Journal of Artificial Intelligence and Data Mining, vol. 7, no. 2, pp. 348–356, May 2024, doi: 10.24014/ijaidm.v7i2.29739.
[15] M. K. Anam, B. N. Pikir, M. B. Firdaus, S. Erlinda, and Agustin, “Penerapan Naïve Bayes Classifier , K-Nearest Neighbor dan Decision Tree untuk Menganalisis Sentimen pada Interaksi Netizen dan Pemeritah,” Matrik: Jurnal Manajemen, Teknik Informatika, dan Rekayasa Komputer, vol. 21, no. 1, pp. 139–150, 2021, doi: 10.30812/matrik.v21i1.1092.
[16] P. I. Pirapong, T. S. Thiradet, and S. K. Sayan, “Enhancing SVM Classification of Breast Cancer Using Dual-Stage PSO Optimization,” in ACM International Conference Proceeding Series, Association for Computing Machinery, Nov. 2024, pp. 153–157. doi: 10.1145/3674658.3674683.
[17] G. R. Ditami, E. F. Ripanti, and H. Sujaini, “Implementasi Support Vector Machine untuk Analisis Sentimen Terhadap Pengaruh Program Promosi Event Belanja pada Marketplace,” JEPIN (Jurnal Edukasi & penelitian Informatika), vol. 8, no. 3, pp. 508–516, 2022, doi: 10.26418/jp.v8i3.56478.
[18] M. H. Arfian et al., “Analisis Sentimen Pada Media Sosial Menggunakan Metode Support Vector Machine,” Jurnal Ilmu Teknik dan Komputer, vol. 9, no. 1, pp. 1–6, 2025, doi: 10.22441/jitkom.v9i1.001.
[19] E. Eskiyaturrofikoh and R. R. Suryono, “Analisis Sentimen Aplikasi X Pada Google Play Store Menggunakan Algoritma Naïve Bayes Dan Support Vector Machine (SVM),” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 9, no. 3, pp. 1408–1419, Aug. 2024, doi: 10.29100/jipi.v9i3.5392.
[20] N. A. Maulana and D. Darwis, “Perbandingan Metode SVM dan Naïve Bayes untuk Analisis Sentimen pada Twitter tentang Obesitas di Kalangan Gen Z,” Jurnal Pendidikan dan Teknologi Indonesia, vol. 5, no. 3, pp. 655–666, Mar. 2025, doi: 10.52436/1.jpti.691.
[21] W. Ningsih, B. Alfianda, R. Rahmaddeni, and D. Wulandari, “Perbandingan Algoritma SVM dan Naïve Bayes dalam Analisis Sentimen Twitter pada Penggunaan Mobil Listrik di Indonesia,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 4, no. 2, pp. 556–562, Feb. 2024, doi: 10.57152/malcom.v4i2.1253.