An Optimize Weights Naïve Bayes Model for Early Detection of Diabetes

Oman Somantri, Ratih Hafsarah Maharrani, Linda Perdana Wanti


This research proposes a method to optimize the accuracy of the Naïve Bayes (NB) model by optimizing weight using a genetic algorithm (GA). The process of giving optimal weight is carried out when the data will be input into the analysis process using NB. The research stages were conducted by preprocessing the data, searching for the classic naïve Bayes model, optimizing the weight, applying the hybrid model, and as the final stage, evaluating the model. The results showed an increase in the accuracy of the proposed model, where the naïve Bayes classical model produced accuracy rate of 87.69% and increased to 88.65% after optimization using GA. The results of the study conclude that the proposed optimization model can increase the accuracy of the classification of early detection of diabetes.


optimize weights; naïve bayes; diabetes; genetic algorithm

Full Text:

PDF (Indonesian)


Anwar, F., Qurat-Ul-Ain, Ejaz, M. Y., & Mosavi, A. (2020). A comparative analysis on diagnosis of diabetes mellitus using different approaches – A survey. Informatics in Medicine Unlocked, 21, 100482. doi:

Candra Permana, B. A., & Dewi Patwari, I. K. (2021). Komparasi Metode Klasifikasi Data Mining Decision Tree dan Naïve Bayes Untuk Prediksi Penyakit Diabetes. Infotek : Jurnal Informatika Dan Teknologi, 4(1), 63–69. doi:

Friedman, N., Geiger, D., Goldszmidt, M., Provan, G., Langley, P., & Smyth, P. (1997). Bayesian Network Classifiers *. Machine Learning, 29, 131–163.

Islam, M. M. F., Ferdousi, R., Rahman, S., & Bushra, H. Y. (2020). Likelihood Prediction of Diabetes at Early Stage Using Data Mining Techniques. Advances in Intelligent Systems and Computing, 992, 113–125. doi:

Kotu, V., & Deshpande, B. (2019). Model Evaluation. In Data Science (pp. 263–279). Elsevier. doi:

M M Faniqul Islam; Rahatara Ferdousi. (2020). UCI Machine Learning Repository: Early stage diabetes risk prediction dataset. Data Set.

Melanie, M. (1996). An introduction to genetic algorithms. Cambridge, Massachusetts London, England. doi:

Mok, C. H., Kwok, H. H. Y., Ng, C. S., Leung, G. M., & Quan, J. (2021).

Health State Utility Values for Type 2 Diabetes and Related Complications in East and Southeast Asia: A Systematic Review and Meta-Analysis. Value in Health. doi:

Mujumdar, A., & Vaidehi, V. (2019). Diabetes Prediction using Machine Learning Algorithms. Procedia Computer Science, 165, 292–299. doi:

Nurdiana, N., & Algifari, A. (2020). Studi Komparasi Algoritma Id3 Dan Algoritma Naive Bayes Untuk Klasifikasi Penyakit Diabetes Mellitus. INFOTECH Journal, 6(2), 18–23.

Ridwan, A. (2020). Penerapan Algoritma Naïve Bayes Untuk Klasifikasi Penyakit Diabetes Mellitus. Jurnal SISKOM-KB (Sistem Komputer Dan Kecerdasan Buatan), 4(1), 15–21. doi:

Shivakumar, B. L., & Alby, S. (2014). A survey on data-mining technologies for prediction and diagnosis of diabetes. Proceedings - 2014 International Conference on Intelligent Computing Applications, ICICA 2014, 167–173. doi:

Shrivastava, R. K., Ramakrishna, S., & Hota, C. (2019). Game theory based modified naïve-bayes algorithm to detect DoS attacks using Honeypot. 2019 IEEE 16th India Council International Conference, INDICON 2019 - Symposium Proceedings, 1–4. doi:

Somantri, O., & Apriliani, D. (2019). Opinion mining on culinary food customer satisfaction using naïve bayes based-on hybrid feature selection. Indonesian Journal of Electrical Engineering and Computer Science, 15(1), 468–475. doi:

Tripathi, A., Yadav, S., & Rajan, R. (2019). Naive Bayes Classification Model for the Student Performance Prediction. 2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies, ICICICT 2019, 1548–1553. doi:

Tripathi, G., & Kumar, R. (2020). Early Prediction of Diabetes Mellitus Using Machine Learning. ICRITO 2020 - IEEE 8th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions), 1009–1014. doi:

Vigneswari, D., Kumar, N. K., Ganesh Raj, V., Gugan, A., & Vikash, S. R. (2019). Machine Learning Tree Classifiers in Predicting Diabetes Mellitus. 2019 5th International Conference on Advanced Computing and Communication Systems, ICACCS 2019, 84–87. doi:

Wang, Z. Z., & Sobey, A. (2020). A comparative review between Genetic Algorithm use in composite optimisation and the state-of-the-art in evolutionary computation. Composite Structures, 233, 111739. doi:



  • There are currently no refbacks.

Indexed by:       


ISSN 2442-4528 (online) | ISSN 1979-925X (print)
Published by : Universitas Amikom Purwokerto
Jl. Let. Jend. POL SUMARTO Watumas, Purwonegoro - Purwokerto Telp (0281) 623321 Fax (0281) 621662


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