Optimasi Algoritma K-Nearest Neighbors Menggunakan GridSearchCV untuk Klasifikasi Penyakit Diabetes - Yaqin, Ainul; Kurniawan, Defri; Zeniarja, Junta (Infotekmesin, 2025)
Diabetes is a chronic disease that has a significant impact on global health, with prevalence increasing every year. Therefore, early detection is crucial to prevent further complications and save lives. The utilization of technology, such as machine learning, offers innovative solutions to improve the accuracy of predicting this disease. This research develops a diabetes prediction model using the K-Nearest Neighbors (KNN) algorithm with the Pima Indians Diabetes Database dataset. Given the class imbalance in the dataset, Random Over-Sampling technique was applied to balance the data distribution. The results showed that the KNN model optimized with GridSearchCV resulted in 88% accuracy, 89% precision, 75% recall, and 82% F1-score. This approach is expected to produce a more accurate and efficient model to support early detection of diabetes, and shows the great potential of machine learning technology in improving the effectiveness of disease diagnosis and control.