Optimasi Kinerja Algoritma K-Nearest Neighbor melalui Metode Random Forest untuk Klasifikasi Penyakit Ginjal

Authors

  • Achmad Hakim Qoirul Haq Universitas Islam Nahdlatul Ulama Jepara
  • Harminto Mulyo Universitas Islam Nahdlatul Ulama Jepara
  • Adi Sucipto Universitas Islam Nahdlatul Ulama Jepara

DOI:

https://doi.org/10.35870/jtik.v10i3.6372

Keywords:

Chronic Kidney Disease, K-Nearest Neighbors, Random Forest, Classification, Machine Learning

Abstract

Chronic Kidney Disease (CKD) is a chronic disease with a continuously increasing prevalence rate and requires early detection to prevent disease progression. This study aims to optimize the performance of the K-Nearest Neighbor (K-NN) algorithm in the classification of chronic kidney disease through the application of the Random Forest method. The dataset used comes from Kaggle and consists of 400 patient data with 26 clinical attributes. The research stages include data pre-processing in the form of handling missing values, categorical data transformation, feature normalization, and data division into training data and test data with a ratio of 80:20. Random Forest is used as a comparison method and optimization approach, while K-NN is used as the main classification algorithm. Model performance evaluation is carried out using accuracy, precision, recall, F1-score, and confusion matrix metrics. The test results show that the Random Forest algorithm obtains an accuracy value of 98.75%, while the K-NN algorithm produces an accuracy of 96.25%. These results prove that the application of Random Forest is able to optimize the performance of K-NN in the classification of chronic kidney disease effectively.

Downloads

Download data is not yet available.

Author Biographies

  • Achmad Hakim Qoirul Haq, Universitas Islam Nahdlatul Ulama Jepara

    Universitas Islam Nahdlatul Ulama Jepara, Kabupaten Jepara, Jawa Tengah, Indonesia.

  • Harminto Mulyo, Universitas Islam Nahdlatul Ulama Jepara

    Universitas Islam Nahdlatul Ulama Jepara, Kabupaten Jepara, Jawa Tengah, Indonesia.

  • Adi Sucipto, Universitas Islam Nahdlatul Ulama Jepara

    Universitas Islam Nahdlatul Ulama Jepara, Kabupaten Jepara, Jawa Tengah, Indonesia.

References

Breiman, L. E. O. (2001). Random forests. Machine Learning, 45(1), 5–32. https://doi.org/10.1023/A:1010933404324.

Chicco, D., & Jurman, G. (2020). The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. IEEE Access, 8, 1–13.

Diqi, M., Ordiyasa, I. W., & Hiswati, M. E. (2023). Comparative analysis of kidney disease detection using machine learning. Journal of Health Informatics, 15(2), 58–62.

Dritsas, E., & Trigka, M. (2022). Machine learning techniques for chronic kidney disease risk prediction.

Id, B. L., Schulte, T., & Groene, O. (2023). The application of machine learning to predict high-cost patients: A performance-comparison of different models using healthcare claims data. PLOS ONE, 1–16. https://doi.org/10.1371/journal.pone.0279540

Islam, M. A., Majumder, M. Z. H., & Hussein, M. A. (2023). Chronic kidney disease prediction based on machine learning algorithms. Journal of Pathology Informatics, 14, 100189. https://doi.org/10.1016/j.jpi.2023.100189

Jeon, H., & Oh, S. (2020). Hybrid-recursive feature elimination for efficient feature selection. Applied Sciences, 10(1), 1–8.

Khalid, H., Khan, A., Zahid Khan, M., Mehmood, G., & Shuaib Qureshi, M. (2023). Machine learning hybrid model for the prediction of chronic kidney disease. Computational Intelligence and Neurosciences, 2023, 1–12. https://doi.org/10.1155/2023/9266889.

Liu, P., Liu, Y., Liu, H., Xiong, L., Mei, C., & Yuan, L. (2024). A random forest algorithm for assessing risk factors associated with chronic kidney disease: Observational study. JMIR Medical Informatics, 8, 1–14. https://doi.org/10.2196/48378.

Majid, M., et al. (2023). Using ensemble learning and advanced data mining techniques to improve the diagnosis of chronic kidney disease. International Journal of Advanced Computer Science and Applications, 14(10), 470–480. https://doi.org/10.14569/IJACSA.2023.0141050.

Miaschi, A., Alzetta, C., Brunato, D., Orletta, F. D., & Venturi, G. (2023). Testing the effectiveness of the diagnostic probing paradigm on Italian treebanks.

Rady, E. A., & Anwar, A. S. (2019). Prediction of kidney disease stages using data mining algorithms. Informatics in Medicine Unlocked, 15, 100178. https://doi.org/10.1016/j.imu.2019.100178.

Rahim, R., & Ahmar, A. S. (2022). Cross-validation and validation set methods for choosing K in KNN algorithm for healthcare case study. Journal of Information Visualization, 3(1), 57–61. https://doi.org/10.35877/454ri.jinav1557

Schonlau, M., & Zou, R. Y. (2020). The random forest algorithm for statistical learning. Journal of Computational Statistics, 1, 3–29. https://doi.org/10.1177/1536867X20909688.

Siregar, M. R., Hartama, D., & Solikhun, S. (2025). Optimizing the KNN algorithm for classifying chronic kidney disease using GridSearchCV. JITK (Jurnal Ilmu Pengetahuan dan Teknologi Komputer), 10(3), 680–689. https://doi.org/10.33480/jitk.v10i3.6214

Son, J., & Lee, H. (2021). Contact-area-changeable CMP conditioning for enhancing pad lifetime. Applied Sciences, 11, 1–10.

Taqwimi, H. M. N., & Wahono, B. B. (2025). Implementation of random forest algorithm with RFE and SMOTE on cardiotocography dataset. International Journal of Health Informatics, 5(2), 139–146.

Downloads

Published

2026-07-01

Issue

Section

Computer & Communication Science

How to Cite

Haq, A. H. Q., Mulyo, H., & Sucipto, A. (2026). Optimasi Kinerja Algoritma K-Nearest Neighbor melalui Metode Random Forest untuk Klasifikasi Penyakit Ginjal. Jurnal JTIK (Jurnal Teknologi Informasi Dan Komunikasi), 10(3), 1208-1216. https://doi.org/10.35870/jtik.v10i3.6372

Most read articles by the same author(s)