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.
Article Details
How to Cite
Citation FormatReferences
17 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.
License
Copyright (c) 2026 Achmad Hakim Qoirul Haq, Harminto Mulyo, Adi Sucipto

This work is licensed under a Creative Commons Attribution 4.0 International License.
This is an open-access journal distributed under the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits unrestricted use, distribution, reproduction, and adaptation in any medium (even commercially), provided appropriate credit is given to the original author(s), a link to the license is provided, and any changes made are indicated. Authors retain copyright without restrictions and grant the journal the right of first publication as well as non-exclusive publishing rights for archiving, indexing, and scholarly dissemination.
Downloads
OJS UsageStats PluginMost read articles by the same author(s)
- Prediksi Ketuntasan Siswa Berbasis Data Multidimensi Menggunakan Metode K-Nearest Neighbor (KNN) di SMK NU Hasyim Asy'ari 2 Kudus Muhammad Syafi’ul Huda, Harminto Mulyo, Gentur Wahyu Nyipto Wibowo · Vol. 10 No. 4 (2026): OCTOBER 2026
- Analisis Data Penjualan Sepatu pada Toko MNNZR.ID Menggunakan Algoritma Apriori dan FP-Growth Mohammad Nabil Nizar, Sarwido Sarwido, Adi Sucipto · Vol. 10 No. 4 (2026): OCTOBER 2026
- Pemodelan Hybrid untuk Prediksi Risiko Keparahan Penyakit Tuberkulosis Menggunakan Algoritma K-Means dan Random Forest Hasan Ibrohim, Harminto Mulyo, Gentur Wahyu Nyipto Wibowo · Vol. 10 No. 3 (2026): JULY 2026
- Penerapan SMOTE dan XGBoost untuk Klasifikasi Penyakit Ginjal Kronis pada Data yang Tidak Seimbang Muhammad Ghufron Syifa, Nadia Anissa Maori, Adi Sucipto · Vol. 10 No. 1 (2026): JANUARY 2026
Recommended Articles
Journal Transparency
Additional InformationLearn more about how this journal ensures quality, ethics, and transparency.