Analisis Komparasi Algoritma KNN dan Naive Bayes untuk Klasifikasi Pasien Rehabilitasi Narkoba di XYZ

Authors

  • Putri Khairunnisa Nabilah Universitas Islam Negeri Sumatera Utara, Medan
  • Triase Triase Universitas Islam Negeri Sumatera Utara, Medan

DOI:

https://doi.org/10.30865/jurikom.v13i1.9553

Keywords:

Data Mining, K-Nearest Neighbors, Naïve Bayes, Drug Rehabilitation, Classification

Abstract

The development of information technology in the field of data mining opens up significant opportunities to optimize data classification in the healthcare and rehabilitation sectors. LRPPN BI Medan currently faces challenges in determining rehabilitation programs because the decision-making process is still subjective and has not yet systematically utilized historical data. Inaccuracies in determining these programs can reduce recovery effectiveness and increase the potential for patient relapse. This study aims to apply and test the effectiveness of the KNN and Naïve Bayes algorithms in classifying rehabilitation programs based on patient criteria, such as duration of drug use, URICA test results, medical history, and addiction level. This study uses a quantitative approach with the Waterfall development method. This solution is proposed to overcome subjectivity through a data-based classification system that complements each other in accuracy and processing speed. The results of this study show that the Naive Bayes algorithm has a higher accuracy rate of 96.43%, while KNN has an accuracy of 94.29%.

References

[1] Nur Azis, Analisis Perancangan Sistem Informasi, vol. 3, no. 1. Bandung: WIDINA BHAKTI PERSADA BANDUNG, 2022.

[2] Y. Lyu, Q. Xu, Z. Yang, and J. Liu, “Prediction of patient choice tendency in medical decision-making based on machine learning algorithm”.

[3] R. S. Wahono, Data Mining Data mining, vol. 2, no. January 2013. 2023. [Online]. Available: https://www.cambridge.org/core/product/identifier/CBO9781139058452A007/type/book_part

[4] T. Triase and S. Samsudin, “Implementasi Data Mining dalam Mengklasifikasikan UKT (Uang Kuliah Tunggal) pada UIN Sumatera Utara Medan,” J. Teknol. Inf., vol. 4, no. 2, pp. 370–376, 2020, doi: 10.36294/jurti.v4i2.1711.

[5] A. Ikhwana et al., “Klasifikasi Kanker Paru-Paru menggunakan Metode Naïve Bayes dengan SMOTE Lung Cancer Classification using the Naïve Bayes Method with SMOTE,” vol. 14, pp. 2954–2967, 2025.

[6] R. Hidayat, F. Sains, U. Islam, and N. Sumatera, “PERANCANGAN APLIKASI PENGARSIPAN SURAT BERBASIS WEB PADA PT . PERKEBUNAN NUSANTARA IV MEDAN,” vol. 8, no. 2, 2024.

[7] K. Huang, C. Yu, X. Chen, Y. Hao, and Y. Ding, “A Quasi-Experimental Study on the Effectiveness of Compulsory and Voluntary Treatment Settings for 1 , 299 Drug Abusers in Hunan , China,” vol. 12, no. August, 2021, doi: 10.3389/fpsyt.2021.613665.

[8] H. Nu, N. Lwin, P. Punnakitikashem, and T. Thananusak, “E-Health Research in Southeast Asia : A Bibliometric Review,” 2023.

[9] T. J. Dalimunthe, “Pengembangan Sitem Monitoring Penjualan Dan Prediksi Stok Barang Menggunakan Exponential Smoothing Berbasis Website,” pp. 170–183.

[10] S. Informasi, M. Kesejahteraan, M. Berbasis, and R. J. Sinaga, “Web-Based Welfare Monitoring Information System with Predictive Analytics for Social Assistance and Scholarship Management,” vol. 4, 2024.

[11] B. Hutagalung, “Analysis Of The K-Nearest Neighbor ( KNN ) Algorithm For Gender Classification Based On Voice Characteristics,” vol. 12, no. 5, pp. 705–720, 2025, doi: 10.30865/jurikom.v12i5.9117.

[12] S. S. Prasetiyowati and Y. Sibaroni, “Unlocking the potential of Naive Bayes for spatio temporal classification : a novel approach to feature expansion,” J. Big Data, 2024, doi: 10.1186/s40537-024-00958-x.

[13] A. M. Harahap, S. Informasi, U. Islam, and N. Sumatera, “IMPLEMENTASI ALGORITMA NAIVE BAYES UNTUK PREDIKSI KEBUTUHAN,” vol. 10, no. 2, pp. 507–513, 2025.

[14] E. B. Susanto, A. N. Anzila, and B. Ismanto, “Comparison Of The Effectiveness Of K-Nearest Neighbor (KNN) And Naive Bayes Algorithms In Identifying Diabetes Patients,” J. Artif. Intell. Softw. Eng., vol. 5, no. 1, p. 22, 2025, doi: 10.30811/jaise.v5i1.6275.

[15] A. Tangkelayuk and E. Mailoa, “Klasifikasi Kualitas Air Menggunakan Metode KNN , Naïve Bayes Dan Decision Tree,” vol. 9, no. 2, pp. 1109–1119, 2022.

[16] I. Artikel, “Analisis Perbandingan Metode K-Nearest Neighbor dan Naïve Bayes Classiffier pada Data Set Penyakit Jantung,” vol. 1, no. 3, pp. 79–86, 2020.

[17] B. Delvika, S. Nurhidayarnis, and P. D. Rinada, “Comparison of Classification Between Naive Bayes and K-Nearest Neighbor on Diabetes Risk in Pregnant Women Perbandingan Klasifikasi Antara Naive Bayes dan K-Nearest Neighbor Terhadap Resiko Diabetes Pada Ibu Hamil,” vol. 2, no. October, pp. 68–75, 2022.

[18] T. Tursina, H. Muhardi, and D. A. Sari, “Diagnosis Tahapan Pengguna Narkoba Menggunakan Metode K-Nearest Neighbor,” J. Edukasi dan Penelit. Inform., vol. 6, no. 1, p. 101, 2020, doi: 10.26418/jp.v6i1.36133.

[19] H. Marfalino, M. Pratiwi, I. Arief Wisky, and D. Akhiyar, “Penerapan Sistem Pakar Dalam Diagnosa Pengguna Narkoba Menggunakan Metode Naïve Bayes,” J. Sains Inform. Terap., vol. 2, no. 2, pp. 30–34, 2023, doi: 10.62357/jsit.v2i2.159.

[20] U. M. Butt et al., “Machine Learning Based Diabetes Classification and Prediction for Healthcare Applications,” vol. 2021, 2021, doi: 10.1155/2021/9930985.

[21] I. G. I. Sudipa, I. G. M. Darmawiguna, I. M. Dendi, and ..., Buku Ajar Data Mining. PT, no. April. 2024.

[22] C. Lin, Z. Liang, J. Liu, and W. Sun, “A machine learning-based prediction model pre-operatively for functional recovery after 1-year of hip fracture surgery in older people,” no. June, pp. 1–12, 2023, doi: 10.3389/fsurg.2023.1160085.

[23] A. Muin, METODE PENELITIAN KUANTITATIF. Malang: CV. Literasi Nusantara Abadi, 2023.

[24] Adnan Buyung Nasution, B. F. E. Lubis, Nurul Amanda Khairani Lubis, and Friska Andriani, “Perancangan Sistem Pelaporan Keluhan Pelanggan Berbasis Website Menggunakan Metode Waterfall,” Bull. Comput. Sci. Res., vol. 4, no. 1, pp. 40–49, 2023, doi: 10.47065/bulletincsr.v4i1.318.

[25] F. D. Pratama and I. Zufria, “Implementasi data mining menggunakan algoritma naïve bayes untuk klasifikasi penerima program indonesia pintar 1) 1,2,3),” vol. 7, no. 1, pp. 77–84, 2022.

[26] M. S. Hasibuan, D. Wahyu, and H. Hutabarat, “SISTEM PAKAR DIAGNOSIS AWAL PENYAKIT FARINGITIS DAN LARINGITIS MENGGUNAKAN METODE FORWARD,” vol. 4307, no. August, pp. 1137–1146, 2024.

[27] Y. Zhang, Y. Yun, R. An, J. Cui, H. Dai, and X. Shang, “Educational Data Mining Techniques for Student Performance Prediction : Method Review and Comparison Analysis,” vol. 12, no. December, pp. 1–19, 2021, doi: 10.3389/fpsyg.2021.698490.

Additional Files

Published

2026-02-25

How to Cite

Putri Khairunnisa Nabilah, & Triase, T. (2026). Analisis Komparasi Algoritma KNN dan Naive Bayes untuk Klasifikasi Pasien Rehabilitasi Narkoba di XYZ . JURNAL RISET KOMPUTER (JURIKOM), 13(1), 128–136. https://doi.org/10.30865/jurikom.v13i1.9553