This study aims to demonstrate the performance of the Random Forest and K-Nearest Neighbors (KNN) algorithms in predicting diabetes risk based on numerical clinical data. The study used a dataset of 757 samples with eight clinical features, namely the number of pregnancies, glucose levels, blood pressure, skin thickness, insulin, body mass index (BMI), familial diabetes predisposition function, and age. The data was divided into 80% training data and 20% testing data, with data scale adjustments to support the classification process. The evaluation results showed that Random Forest produced better performance with an accuracy of 73.7% and an F1-Score of 0.623, compared to KNN with an accuracy of 72.4% and an F1-Score of 0.604. Comparison of classification results showed that Random Forest was able to provide more consistent predictions in distinguishing groups at risk of diabetes from healthy groups. The contribution of this study is to provide an empirical evaluation of the description of two classification algorithms commonly used on numerical clinical data and show that Random Forest is more suitable for the development of a decision support system for diabetes risk prediction. This research can be the basis for the development of more accurate prediction models through the use of broader datasets and other machine learning methods.
Copyrights © 2026