Comparative Evaluation of Machine Learning Algorithms for Diabetes Prediction with SMOTE and Principal Component Analysis
DOI:
https://doi.org/10.30865/json.v7i4.9903Keywords:
Diabetes Prediction, Machine Learning, SMOTE, PCA, ClassificationAbstract
Diabetes mellitus is a chronic disease that requires early detection to reduce the risk of severe complications. However, machine learning-based diabetes prediction is often affected by class imbalance and high-dimensional data. This study investigates the effectiveness of integrating Synthetic Minority Over-sampling Technique (SMOTE) and Principal Component Analysis (PCA) for diabetes prediction. A total of 80,437 records from a Kaggle diabetes dataset were processed using the Knowledge Discovery in Databases (KDD) framework. Six machine learning algorithms, namely Random Forest, XGBoost, Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Naïve Bayes, and Neural Network, were evaluated using train-test split ratios of 70:30, 80:20, and 90:10. Performance was measured using accuracy, precision, recall, and F1-score. Without oversampling, XGBoost consistently achieved the highest accuracy across all split ratios, peaking at 94.04% at the 80:20 ratio; however, recall for the minority (diabetic) class remained substantially lower than for the majority class, indicating that high overall accuracy masked weaker detection of actual diabetes cases. After applying SMOTE, overall accuracy declined across all models (e.g., XGBoost fell to 87.52% at 80:20), but minority-class recall improved markedly, indicating a more balanced classification between classes at the cost of overall accuracy. Notably, at the 80:20 split, the Neural Network achieved a marginally higher accuracy (87.67%) than XGBoost under SMOTE, although XGBoost remained the top performer at the 70:30 and 90:10 ratios, suggesting that its advantage under class-balanced conditions is not uniform across split ratios. PCA was applied to reduce data dimensionality and did not substantially affect predictive performance; however, the present results do not include quantitative evidence, such as the change in feature count or computation time, needed to substantiate claims about its contribution to efficiency. These findings suggest that XGBoost with an 80:20 split is the most effective configuration when class imbalance is not addressed, while the application of SMOTE narrows the performance gap between models and shifts the trade-off toward more balanced, rather than purely accuracy-maximizing, classification.
References
[1] J. J. Khanam and S. Y. Foo, “A comparison of machine learning algorithms for diabetes prediction,” ICT Express, vol. 7, no. 4, pp. 432–439, 2021, doi: 10.1016/j.icte.2021.02.004.
[2] V. Jaiswal, A. Negi, and T. Pal, “A review on current advances in machine learning based diabetes prediction,” Prim. Care Diabetes, vol. 15, no. 3, pp. 435–443, 2021, doi: 10.1016/j.pcd.2021.02.005.
[3] U. e. Laila, K. Mahboob, A. W. Khan, F. Khan, and W. Taekeun, “An Ensemble Approach to Predict Early-Stage Diabetes Risk Using Machine Learning: An Empirical Study,” Sensors, vol. 22, no. 14, pp. 1–15, 2022, doi: 10.3390/s22145247.
[4] Y. Du, A. R. Rafferty, F. M. McAuliffe, L. Wei, and C. Mooney, “An explainable machine learning-based clinical decision support system for prediction of gestational diabetes mellitus,” Sci. Rep., vol. 12, no. 1, pp. 1–14, 2022, doi: 10.1038/s41598-022-05112-2.
[5] Y. N. Chan et al., “A machine learning approach for early prediction of gestational diabetes mellitus using elemental contents in fingernails,” Sci. Rep., vol. 13, no. 1, pp. 1–11, 2023, doi: 10.1038/s41598-023-31270-y.
[6] M. M. Mijwil and M. Aljanabi, “A Comparative Analysis of Machine Learning Algorithms for Classification of Diabetes Utilizing Confusion Matrix Analysis,” Baghdad Sci. J., vol. 21, no. 5, pp. 1712–1728, 2024, doi: 10.21123/BSJ.2023.9010.
[7] Y. Gong, G. Liu, Y. Xue, R. Li, and L. Meng, “A survey on dataset quality in machine learning,” Inf. Softw. Technol., vol. 162, no. September 2022, p. 107268, 2023, doi: 10.1016/j.infsof.2023.107268.
[8] C. Y. Chou, D. Y. Hsu, and C. H. Chou, “Predicting the Onset of Diabetes with Machine Learning Methods,” J. Pers. Med., vol. 13, no. 3, 2023, doi: 10.3390/jpm13030406.
[9] P. O. Côté, A. Nikanjam, N. Ahmed, D. Humeniuk, and F. Khomh, “Data cleaning and machine learning: a systematic literature review,” Autom. Softw. Eng., vol. 31, no. 2, 2024, doi: 10.1007/s10515-024-00453-w.
[10] C. Fan, M. Chen, X. Wang, J. Wang, and B. Huang, “A Review on Data Preprocessing Techniques Toward Efficient and Reliable Knowledge Discovery From Building Operational Data,” Front. Energy Res., vol. 9, no. March, pp. 1–17, 2021, doi: 10.3389/fenrg.2021.652801.
[11] W. Jia, M. Sun, J. Lian, and S. Hou, “Feature dimensionality reduction: a review,” Complex Intell. Syst., vol. 8, no. 3, pp. 2663–2693, 2022, doi: 10.1007/s40747-021-00637-x.
[12] Z. Jayidan, A. M. Siregar, S. Faisal, and H. Hikmayanti, "Peningkatan Akurasi Prediksi Penyakit Jantung Menggunakan Principal Component Analysis (PCA) Pada Algoritma Machine Learning," J. Tek. Inform., vol. 5, no. 3, pp. 821-830, 2024, doi: 10.52436/1.jutif.2024.5.3.2047.
[13] X. Yi, Y. Xu, Q. Hu, S. Krishnamoorthy, W. Li, and Z. Tang, “ASN-SMOTE: a synthetic minority oversampling method with adaptive qualified synthesizer selection,” Complex Intell. Syst., vol. 8, no. 3, pp. 2247–2272, 2022, doi: 10.1007/s40747-021-00638-w.
[14] A. Davinka, S. Depari, K. D. Tania, and P. E. Sevtiyuni, "Penerapan Metode Machine Learning dan Teknik SMOTE untuk Prediksi Diabetes," J. Sist. Komput. dan Inform. (JSON), vol. 7, no. 2, pp. 436-447, 2025, doi: 10.30865/json.v7i2.9032.
[15] V. R. Joseph, “Optimal ratio for data splitting,” Stat. Anal. Data Min., vol. 15, no. 4, pp. 531–538, 2022, doi: 10.1002/sam.11583.
[16] E. Dritsas and M. Trigka, “Data-Driven Machine-Learning Methods for Diabetes Risk Prediction,” Sensors, vol. 22, no. 14, 2022, doi: 10.3390/s22145304.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Jurnal Sistem Komputer dan Informatika (JSON)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This work is licensed under a Creative Commons Attribution 4.0 International License
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).

