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.
Copyrights © 2026