Performance enhancement of machine learning models for diabetes diagnosis through data balancing and hyperparameter optimization
Early and reliable prediction of diabetes is crucial for better outcomes. Seven machine learning (ML) algorithms—Logistic Regression (LR), Decision Tree (DT), Support Vector Machines (SVM), K-Nearest Neighbors (KNN), Gradient Boosting (GB), LightGBM, and CatBoost—are assessed for diagnosing diabetes automatically. The models were tested using a sequential approach, including imputing missing values, removing outliers, balancing the data samples using Synthetic Minority Oversampling Technique (SMOTE) and hyperparameter tuning using GridSearchCV. Using 10-fold cross-validation on the Pima Indian Diabetes (PIMA) dataset, CatBoost outperformed other models with an accuracy of 83.70% and F1-score of 84.49%, with KNN, GB and LightGBM performing similarly. External validation on a German dataset ( n = 2,000) yielded higher accuracy (up to ~90%), with KNN, LightGBM, and CatBoost maintaining strong performance, suggesting good generalization across datasets. Overall, the results indicate that careful preprocessing and model optimization can enhance predictive performance, highlighting the potential of ensemble-based methods for clinical decision support.
Authors
- Neelam Gohar (ORCID: https://orcid.org/0000-0002-9792-0959)
- Muhammad Uzair Khan (ORCID: https://orcid.org/0000-0002-0557-2900)
- Amal Al‐Rasheed (ORCID: https://orcid.org/0000-0002-4775-1798)
- Fazal Muhammad (ORCID: https://orcid.org/0000-0003-0405-0083)
- Shahid Khan
- Saadia Tabassum
- Muhammad Lais
Institutions
- Princess Nourah bint Abdulrahman University (SA)
- Shaheed Benazir Bhutto Women University Peshawar (PK)
- COMSATS University Islamabad (PK)
- Abdul Wali Khan University Mardan (PK)
- University of Technology Nowshera
- University of Engineering and Technology Peshawar (PK)
Publication Details
- Journal
- PeerJ Computer Science
- Published
- 2026-10-06
- DOI
- https://doi.org/10.7717/peerj-cs.4099
- Primary Topic
- Artificial Intelligence in Healthcare
- Type
- article
- Field-Weighted Citation Impact
- 0.00