Khazanah Informatika : Jurnal Ilmu Komputer dan Informatika
Vol. 11 No. 2 (2025): October 2025

Comparison of Backward Elimination Features on Diabetes Disease Classification Accuracy using K-Nearest Neighbor and Random Forest Algorithms

Gusti Chandra Kurniawan (Universitas Ahmad Dahlan)
Imam Riadi (Universitas Ahmad Dahlan)
Anton Yudhana (Universitas Ahmad Dahlan)



Article Info

Publish Date
18 Oct 2026

Abstract

The critical need for faster, more accurate diagnosis of diabetes mellitus by machine learning classification models is highlighted by the exponential growth in the global incidence of the disease. The predominance of clinical traits and an unequal class distribution, among other problems, usually make it difficult for these models to forecast results. This research investigates the comparative performance of K-Nearest Neighbor (KNN) and Random Forest (RF) algorithms in diagnosing diabetes using a unified pipeline. The methodology encompasses several stages: data preprocessing (including the treatment of missing values, normalization, and encoding), feature selection via backward elimination, class rebalancing using the Synthetic Minority Over-sampling Technique (SMOTE), and performance assessment through a 5-fold cross-validation protocol. The dataset from Mendeley Data was separated into two categories: those with diabetes and those without.   Based on the results, the RF algorithm achieved 97.10% accuracy, 99.52% precision, 98.26% F1-score, and 99.50% ROC-AUC, outperforming KNN in most evaluation criteria.   However, KNN also shows a competitive ability to categorize data with a high precision rate of 99.15%.   These results show that feature selection and data balance techniques should be part of every classification pipeline if we want more consistent and accurate models.   The research concludes that Random Forest is more appropriate for clinical diabetes classification and suggests the systematic use of structured preprocessing in developing systems for early detection of chronic illnesses.

Copyrights © 2025






Journal Info

Abbrev

khif

Publisher

Subject

Computer Science & IT Control & Systems Engineering

Description

Khazanah Informatika : Jurnal Ilmu Komputer dan Informatika, an Indonesian national journal, publishes high-quality research papers in the broad field of Informatics and Computer Science, which encompasses software engineering, information system development, computer systems, computer network, ...