Sentiment Analysis of Public Opinion on Hajj Pilgrimage Travel Costs Using the K-Nearest Neighbors (KNN) Method

Zeinor Rahman, Haryono Haryono, Rachmad Hidayat

Abstract

In the context of Islam, humans have the duty to educate themselves, purify their souls, and control their desires. Worship performed with sincerity and pure faith is considered a blessing. One example of worship in Islam is performing the Hajj pilgrimage, which is one of the five pillars of Islam, along with the declaration of faith (shahada), prayer (salat), almsgiving (zakat), and fasting (sawm). Hajj requires self-control, dedication, and sacrifice, including financial resources (Noor, 2018). However, the cost of the Hajj pilgrimage, proposed by the Ministry of Religious Affairs (Kemenag), is set to increase by almost 100% from the previous year, reaching IDR 69 million per person in 2023, eliciting various responses from the public. Some responses are constructive and positive, while others oppose the increase. Sentiment analysis is the method used to analyze public reactions to this change. Data for sentiment analysis was gathered from Twitter, with tweets processed using the Tf-Idf and Tf-Rf word weighting methods. The K-Nearest Neighbors (KNN) algorithm was then employed to assess the accuracy and effectiveness of these methods. The study findings revealed that the Tf-Idf word weighting method outperformed Tf-Rf in categorizing public sentiment regarding the cost of the Hajj pilgrimage. Tf-Idf achieved 84% accuracy, 81% precision, and 79% recall, while Tf-Rf achieved 79% accuracy, 75% precision, and 77% recall. Tf-Idf is considered superior in this sentiment analysis, providing precise predictions while effectively capturing important sentiments. Therefore, this method is deemed a reliable choice for accurate sentiment analysis

Keywords

Sentiment Analysis, K-Nearest Neighbors (KNN), Tf-Idf, Tf-Rf.

Full Text:

PDF

References

Alrajak, M. S., Ernawati, I., & Nurlaili, I. (2020). Analisis Sentimen Terhadap Pelayanan PT PLN di Jakarta pada Twitter dengan Algoritma K- Nearest Neighbor (K-NN). Seminar Nasional Mahasiswa Ilmu Komputer Dan Aplikasinya (SENAMIKA), 110–122.

Dwiki, A., Putra, A., Juanita, S., Studi, P., Informasi, S., Teknologi, F., Universitas, I., & Luhur, B. (2021). Analisis Sentimen Pada Ulasan Pengguna Aplikasi Bibit Dan Bareksa Dengan Algoritma KNN. 8(2), 636–646

Istiqlaliyyah, I., Sari, Y. A., & Fauzi, M. A. (2019). Pencarian Teks pada Terjemahan Ayat Al- Qur ’ an dengan Menggunakan TF-RF dan Bray-Curtis Distance. Jurnal Pengembangan Teknologi Informasi Dan Ilmu Komputer, 3(5), 4357–4363.

Joergensen Munthe, C. E., Astuti Hasibuan, N., & Hutabarat, H. (2022). Penerapan Algoritma Text Mining Dan TF-RF Dalam Menentukan Promo Produk Pada Marketplace. Media Online, 2(3), 110–115

Kevin, V., Que, S., Iriani, A., & Purnomo, H. D. (2020). Analisis Sentimen Transportasi Online Menggunakan Support Vector Machine Berbasis Particle Swarm Optimization (Online Transportation Sentiment Analysis Using Support Vector Machine Based on Particle Swarm Optimization). 9(2), 162–170

Laurensz, B., & Eko Sediyono. (2021). Analisis Sentimen Masyarakat terhadap Tindakan Vaksinasi dalam Upaya Mengatasi Pandemi Covid-19. Jurnal Nasional Teknik Elektro Dan Teknologi Informasi, 10(2), 118–123. https://doi.org/10.22146/jnteti.v10i2.1421

Noor, M. (2018). Haji dan Umrah. Jurnal Humaniora Teknologi, 4(1), 38–42. https://doi.org/10.34128/jht.v4i1.42

Pratama, A. Y., Umaidah, Y., & Voutama, A. (2021). Analisis Sentimen Media Sosial Twitter Dengan Algoritma K-Nearest Neighbor Dan Seleksi Fitur Chi-Square ( Kasus Omnibus Law Cipta Kerja ). Jurnal Sains Komputer & Informatika (J-SAKTI), 5(September), 897–910

Sari, D. I., Wati, Y. F., & Widiastuti. (2020). Analisis Sentimen Dan Klasifikasi Tweets Berbahasa Indonesia Terhadap Transportasi Umum Mrt Jakarta Menggunakan Naïve Bayes Classifier. Jurnal Ilmiah Informatika Komputer, 25(1), 64–75. https://doi.org/10.35760/ik.2020.v25i1.2427

Septian, J. A., Fahrudin, T. M., & Nugroho, A. (2019). Analisis Sentimen Pengguna Twitter Terhadap Polemik Persepakbolaan Indonesia Menggunakan Pembobotan TF-IDF dan K-Nearest Neighbor. 43–49

Siregar, R. R. A., Siregar, Z. U., & Arianto, R. (2019). Klasifikasi Sentiment Analysis Pada Komentar Peserta Diklat Menggunakan Metode K-Nearest Neighbor. Kilat, 8(1), 81–92. https://doi.org/10.33322/kilat.v8i1.421

Wijaya, N. (2019). Penerapan Algoritma Klasifikasi Naive Bayes Untuk Data Status Huni Rumah Bantuan Dana Rehabilitasi Dan Rekonstruksi Pasca Bencana Erupsi Gunung Merapi 2010. Seminar Nasional UNRIYO, 1–10

DOI

https://doi.org/10.21107/ijseit.v9i2.31221

Metrics

Refbacks

  • There are currently no refbacks.


Copyright (c) 2025 Zeinor Rahman

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