Machine Learning-Based Diabetes Mellitus Classification Using Multi-Dataset Evaluation and Class Imbalance Resampling - Wijiyanto; Agustinus Eko Setiawan; Ferly Ardhy; Ritzkal; Ummi Athiyah (Politeknik Negeri Cilacap, 2026)
Diabetes mellitus (DM) remains a major global health challenge due to its increasing prevalence and long-term complications, emphasizing the need for accurate early prediction systems. This study proposes a machine learning-based framework for DM classification using a multi-dataset setting while addressing class imbalance issues. Two independent datasets from Iraq and Germany were employed to evaluate model robustness across different population characteristics. The experimental workflow consisted of data preprocessing, stratified train-test splitting, imbalance handling using Synthetic Minority Over-sampling Technique (SMOTE) and SMOTE-Tomek, 10-fold cross-validation, and hyperparameter optimization via GridSearchCV. Four classification algorithms were compared, namely Logistic Regression (LR), K-Nearest Neighbors (KNN), Random Forest (RF), and Support Vector Machine (SVM). Experimental results demonstrate that data distribution significantly affects classification performance. Under imbalanced conditions, RF achieved the best performance on the Iraqi dataset with an accuracy of 0.98 and an AUC of 1.00, while KNN and RF reached perfect accuracy (1.00) on the German dataset. After applying SMOTE, all models showed more stable performance, particularly in recall, which reached 1.00, indicating effective minority-class detection. In contrast, SMOTE-Tomek produced only marginal additional improvements. The findings suggest that no single classifier is universally optimal for DM prediction. Instead, model effectiveness depends on dataset characteristics and preprocessing strategies. From a practical perspective, the combination of RF and SMOTE shows strong potential for early diabetes screening and clinical decision-support systems. Further validation using larger and more heterogeneous external datasets is recommended.