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] A. Firmansyah, Abdullah, and Samsudin, “Rancang Bangun Sistem Klasifikasi Biji Pinang Menggunakan Metode Nearest Mean Classifier Berbasis Android,” vol. 10, pp. 250–257, 2021.

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

[9] Samsudin, A. Ikhwan, R. A. Putri, and M. Badri, “Implementasi Algoritma Backpropagation Neural Networks Untuk Memprediksi Hasil Kinerja Dosen,” vol. 4, no. 2, pp. 410–417, 2023, doi: 10.47065/josh.v4i2.2685.

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

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

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

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

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

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

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

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

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

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

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

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

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

[23] Samsudin and A. Syahfitri, “PERANCANGAN PENJADWALAN SERVICE BENGKEL ARMADA PENDAHULUAN membawa dampak signifikan pada berbagai sektor bisnis , termasuk dalam pengelolaan armada Perusahaan ( Yunita et al ., 2022 ). PT . Sumatrasarana Sekar Sakti sebagai perusahaan yang bergerak di pe,” vol. 4, pp. 222–232, 2023.

[24] G. Rizka Utami Sinaga and Samsudin, “Implementasi Framework Laravel dalam Sistem Reservasi pada Restoran Cindelaras Kota Medan Implementation of Laravel Framework in Reservation System at Cindelaras Restaurant in Medan City,” vol. 1, no. 2, pp. 73–84, 2021, doi: 10.25008/janitra.v1i2.131.

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

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

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

[28] 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 . JURIKOM (Jurnal Riset Komputer), 13(1), 128–136. https://doi.org/10.30865/jurikom.v13i1.9553