Optimasi Algoritma K-Nearest Neighbors Menggunakan Teknik Bayesian Optimization Untuk Klasifikasi Diabetes
Abstract
Diabetes is one of the chronic diseases that affects millions of people worldwide. Early diagnosis is crucial to prevent long-term complications, but the main challenges lie in the complexity of medical data and selecting optimal parameters for classification algorithms. This research aims to optimize the K-Nearest Neighbors (KNN) algorithm using Bayesian Optimization to improve accuracy in diabetes classification. The dataset used is the "Early-stage Diabetes Risk Prediction" from the UCI Machine Learning Repository, preprocessed through normalization and categorical feature encoding. Bayesian Optimization was applied to find the optimal parameters, such as the number of neighbors (k) and the best distance metric. The results show that the optimized KNN achieved 91.34% accuracy, 100% precision, and a 93.23% F1-Score, demonstrating a significant improvement over the standard KNN model. In conclusion, KNN optimization with Bayesian Optimization proves effective in enhancing diabetes classification performance and can contribute significantly to early detection and disease management.
Downloads
References
J. Kumar, R. K. Tiwari, and V. Pandey, “Diabetes prediction using machine learning tools,” in 2021 4th International Conference on Recent Trends in Computer Science and Technology (ICRTCST), IEEE, Feb. 2022, pp. 263–267. doi: 10.1109/ICRTCST54752.2022.9781963.
D. Mohajan and H. K. Mohajan, “Basic Concepts of Diabetics Mellitus for the Welfare of General Patients,” Stud. Soc. Sci. Humanit., vol. 2, no. 6, pp. 23–31, Jun. 2023, doi: 10.56397/SSSH.2023.06.03.
J. Wu et al., “Associations Among Microvascular Dysfunction, Fatty Acid Metabolism, and Diabetes,” Cardiovasc. Innov. Appl., vol. 8, no. 1, 2023, doi: 10.15212/CVIA.2023.0076.
A. Mishra, “Cardiovascular complications of diabetes mellitus,” InnovAiT Educ. Inspir. Gen. Pract., vol. 15, no. 6, pp. 354–361, Jun. 2022, doi: 10.1177/17557380221086012.
C. G. Yedjou et al., “The Management of Diabetes Mellitus Using Medicinal Plants and Vitamins,” Int. J. Mol. Sci., vol. 24, no. 10, p. 9085, May 2023, doi: 10.3390/ijms24109085.
Q. SAIHOOD and E. SONUÇ, “A practical framework for early detection of diabetes using ensemble machine learning models,” Turkish J. Electr. Eng. Comput. Sci., vol. 31, no. 4, pp. 722–738, Jul. 2023, doi: 10.55730/1300-0632.4013.
H. Sharma, R. Kumar, and M. Gupta, “Optimised Machine Learning Algorithm for Detection And Diagnosis of Diabetes,” in 2023 2nd International Conference on Computational Modelling, Simulation and Optimization (ICCMSO), IEEE, Jun. 2023, pp. 21–27. doi: 10.1109/ICCMSO59960.2023.00018.
A. R. Kulkarni et al., “Machine-learning algorithm to non-invasively detect diabetes and pre-diabetes from electrocardiogram,” BMJ Innov., vol. 9, no. 1, pp. 32–42, Jan. 2023, doi: 10.1136/bmjinnov-2021-000759.
A. Asmarani et al., “Implementasi Algoritma K-Nearst Neighbor Untuk Memprediksi Penyakit Diabetes,” J. Inform. Dan Rekayasa Komputer(JAKAKOM), vol. 2, no. 2, pp. 231–239, 2022, doi: 10.33998/jakakom.2022.2.2.110.
P. Sejati, Munawar, M. Pilliang, and H. Akbar, “Studi Komparasi Naive Bayes , K-Nearest Neighbor, dan Random Forest Untuk Prediksi Calon Mahasiswa Yang Diterima Atau Comparative Study Of Naive Bayes , K-Nearest Neighbor , And Random Forest For The Prediction Of Prospective Students,” J. Teknol. Inf. dan Ilmu Komput., vol. 9, no. 7, pp. 1341–1348, 2022, doi: 10.25126/jtiik.202296737.
U. Hasanah, L. R. Mayangsari, A. Pratama, and I. Cholissodin, “Perbandingan Metode SVM, FUZZY-KNN, Dan BDT-SVM Untuk Klasifikasi Detak Jantung Hasil Elektrokardiografi,” J. Teknol. Inf. dan Ilmu Komput., vol. 3, no. 3, p. 201, 2016, doi: 10.25126/jtiik.201633196.
E. S. Almutairi and M. F. Abbod, “Machine Learning Methods for Diabetes Prevalence Classification in Saudi Arabia,” Modelling, vol. 4, no. 1, pp. 37–55, Jan. 2023, doi: 10.3390/modelling4010004.
S. Suriya and J. Joanish Muthu, “Type 2 Diabetes Prediction using K-Nearest Neighbor Algorithm,” J. Trends Comput. Sci. Smart Technol., vol. 5, no. 2, pp. 190–205, Jun. 2023, doi: 10.36548/jtcsst.2023.2.007.
I. Journal, “Diabetes Prediction using Machine Learning Algorithms,” INTERANTIONAL J. Sci. Res. Eng. Manag., vol. 07, no. 02, Feb. 2023, doi: 10.55041/IJSREM17771.
A. Modi, S. Kumar, and G. Geetha, “Hyperglycemia Prediction Using Machine Learning,” in 2023 14th International Conference on Computing Communication and Networking Technologies (ICCCNT), IEEE, Jul. 2023, pp. 1–8. doi: 10.1109/ICCCNT56998.2023.10306993.
B. Sharma, “Performance Evaluation of Various Classifiers for Diabetes Detection: A Comparative Approach,” Int. J. Converg. Healthc., vol. 2, no. 1, 2022, doi: 10.55487/ijcih.v2i1.18.
X. Li, M. Curiger, R. Dornberger, and T. Hanne, “Optimized Computational Diabetes Prediction with Feature Selection Algorithms,” in Proceedings of the 2023 7th International Conference on Intelligent Systems, Metaheuristics & Swarm Intelligence, New York, NY, USA: ACM, Apr. 2023, pp. 36–43. doi: 10.1145/3596947.3596948.
D. Susilowati, S. Sutrisno, and M. Yunus, “Penerapan Particle Swarm Optimization Untuk Meningkatkan Kinerja Algoritma K-Nearest Neighbor Dalam Klasifikasi Penyakit Diabetes,” J-REMI J. Rekam Med. dan Inf. Kesehat., vol. 4, no. 3, pp. 176–184, Jun. 2023, doi: 10.25047/j-remi.v4i3.3980.
D. S. Khafaga, A. H. Alharbi, I. Mohamed, and K. M. Hosny, “An Integrated Classification and Association Rule Technique for Early-Stage Diabetes Risk Prediction,” Healthcare, vol. 10, no. 10, p. 2070, Oct. 2022, doi: 10.3390/healthcare10102070.
Samsari, P. P. Irfana, and N. Zulkarnaim, “Prediction of Cocoa Productivity in Mamuju Regency with the K-Nearest Neighbor Algorithm,” In Search, 2020, [Online]. Available: https://api.semanticscholar.org/CorpusID:228829578
T. Palabaş, “EARLY-STAGE DIABETES RISK PREDICTION USING MACHINE LEARNING TECHNIQUES BASED ON ENSEMBLE APPROACH,” Eskişehir Tek. Üniversitesi Bilim ve Teknol. Derg. - C Yaşam Bilim. Ve Biyoteknoloji, 2024, [Online]. Available: https://api.semanticscholar.org/CorpusID:271555897
N. Sakib et al., “EEG-Driven Age Prediction: Advancements in Machine Learning Models,” 2023 3rd Int. Conf. Electron. Electr. Eng. Intell. Syst., pp. 383–388, 2023, [Online]. Available: https://api.semanticscholar.org/CorpusID:266194635
G. F. Fahrudin, S. Suroso, and S. Soim, “Pengembangan Model Support Vector Machine untuk Meningkatkan Akurasi Klasifikasi Diagnosis Penyakit Jantung,” J. Teknol. Sist. Inf. dan Apl., 2024, [Online]. Available: https://api.semanticscholar.org/CorpusID:272448734
D. A. Anggoro, “Comparison of Accuracy Level of Support Vector Machine (SVM) and K-Nearest Neighbors (KNN) Algorithms in Predicting Heart Disease,” Int. J. Emerg. Trends Eng. Res., 2020, [Online]. Available: https://api.semanticscholar.org/CorpusID:225829420
N. B, R. D. S, R. Annamalai, R. Bhuvaneswari, and S. S. Husain, “An Exploration of the Performance using Ensemble Methods Utilizing Random Forest Classifier for Diabetes Detection,” 2023 Int. Conf. Network, Multimed. Inf. Technol., pp. 1–7, 2023, [Online]. Available: https://api.semanticscholar.org/CorpusID:264293171
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Optimasi Algoritma K-Nearest Neighbors Menggunakan Teknik Bayesian Optimization Untuk Klasifikasi Diabetes
Pages: 283-290
Copyright (c) 2024 Nur Kholis Sowabi, Nur Aeni Widiastuti, Nadia Annisa Maori

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).






















