CLASSIFICATION OF HEART DISEASE USING THE K-NEAREST NEIGHBOR ALGORITHM AND LOGISTIC REGRESSION

  • I Kadek Agga Sugitha Universitas Nasional
  • Agung Triayudi Universitas Nasional
  • Endah Tri Esti Handayani Universitas Nasional
Keywords: classification, heart disease, k-nearest neighbors, logistic regression, streamlit

Abstract

Heart disease is a major cause of death in the world, including in Indonesia, with increasing rates and death rates that carry a huge burden on health and society. Lack of awareness of early signs contributes significantly to this challenge. This study aims to prevent heart disease through early diagnosis using K-Nearest Neighbor (K-NN) and Logistic Regression algorithms. The database, obtained from Kaggle.com, includes 15 clinical units for cardiac diagnosis. The test shows that the K-NN method with k = 3 achieves the highest performance on the experimental data (30%), with 90% precision, 93% precision, 87% recall, and 90% f1 - score. In comparison, Logistic Regression and sigmoid achieved 86% precision, 83% precision, 90% recall, and 86% f1-score on the same experimental data. These results show that K-Nearest Neighbor is better than Logistic Regression as a classification algorithm for heart disease database. Applying these findings to the web-based Streamlit system is expected to improve the efficiency and timeliness of heart disease screening.

Downloads

Download data is not yet available.

References

Almustafa, K. M. (2020). Prediction of heart disease and classifiers’ sensitivity analysis. BMC Bioinformatics, 21(1), 1–18. https://doi.org/10.1186/s12859-020-03626-y

Alnuaimi, A. F. A. H., & Albaldawi, T. H. K. (2024). An overview of machine learning classification techniques. BIO Web of Conferences, 97, 1–24. https://doi.org/10.1051/bioconf/20249700133

Ariawan, M. D., Triayudi, A., & Sholihati, I. D. (2020). Perancangan User Interface Design dan User Experience Mobile Responsive Pada Website Perusahaan. Jurnal Media Informatika Budidarma, 4(1), 161. https://doi.org/10.30865/mib.v4i1.1896

Bianto, M. A., Kusrini, K., & Sudarmawan, S. (2020). Perancangan Sistem Klasifikasi Penyakit Jantung Mengunakan Naïve Bayes. Creative Information Technology Journal, 6(1), 75. https://doi.org/10.24076/citec.2019v6i1.231

G, A., Ganesh, B., Ganesh, A., Srinivas, C., Dhanraj, & Mensinkal, K. (2022). Logistic regression technique for prediction of cardiovascular disease. Global Transitions Proceedings, 3(1), 127–130. https://doi.org/10.1016/j.gltp.2022.04.008

Hartono, A., Aska Dewi, L., Yuniarti, E., Tahta Hirani Putri, S., Surya Harahap, T., & Hartono, A. (2023). Machine Learning Classification for Detecting Heart Disease with K-NN Algorithm, Decision Tree and Random Forest. Eksakta : Berkala Ilmiah Bidang MIPA, 24(04), 513–522. Retrieved from http://www.eksakta.ppj.unp.ac.id/index.php/eksakta

Ibrahim, I., & Abdulazeez, A. (2021). The Role of Machine Learning Algorithms for Diagnosing Diseases. Journal of Applied Science and Technology Trends, 2(01), 10–19. https://doi.org/10.38094/jastt20179

Kadhim, M. A., & Radhi, A. M. (2023). Heart disease classification using optimized Machine learning algorithms. Iraqi Journal for Computer Science and Mathematics, 4(2), 31–42. https://doi.org/10.52866/ijcsm.2023.02.02.004

Kavitha, M., Gnaneswar, G., Dinesh, R., Sai, Y. R., & Suraj, R. S. (2021). Heart Disease Prediction using Hybrid machine Learning Model. 2021 6th International Conference on Inventive Computation Technologies (ICICT), 1329–1333. IEEE. https://doi.org/10.1109/ICICT50816.2021.9358597

Li, J. P., Haq, A. U., Din, S. U., Khan, J., Khan, A., & Saboor, A. (2020). Heart Disease Identification Method Using Machine Learning Classification in E-Healthcare. IEEE Access, 8(Ml), 107562–107582. https://doi.org/10.1109/ACCESS.2020.3001149

Muharram, F. R., Multazam, C. E. C. Z., Mustofa, A., Socha, W., Andrianto, Martini, S., … Yi-Li, C. (2024). The 30 Years of Shifting in The Indonesian Cardiovascular Burden—Analysis of The Global Burden of Disease Study. Journal of Epidemiology and Global Health, 14(1), 193–212. https://doi.org/10.1007/s44197-024-00187-8

Prasetyo, A. B., & Laksana, T. G. (2022). Optimasi Algoritma K-Nearest Neighbors dengan Teknik Cross Validation Dengan Streamlit (Studi Data: Penyakit Diabetes). Journal of Applied Informatics and Computing (JAIC), 6(2), 194–204. Retrieved from http://jurnal.polibatam.ac.id/index.php/JAIC

Radhika, R., & Thomas George, S. (2021). Heart Disease Classification Using Machine Learning Techniques. Journal of Physics: Conference Series, 1937(1). https://doi.org/10.1088/1742-6596/1937/1/012047

Sumara, R., Ari, N., & Indarti, I. (2022). Identifikasi Faktor Kejadian Penyakit Jantung Koroner Terhadap Wanita Usia ≤ 50 Tahun di RSU Haji Surabaya. Jurnal Manajemen Asuhan Keperawatan, 6(2), 53–59. https://doi.org/10.33655/mak.v6i2.134

Ullah, F., Chen, X., Rajab, K., Al Reshan, M. S., Shaikh, A., Hassan, M. A., … Davidekova, M. (2022). An Efficient Machine Learning Model Based on Improved Features Selections for Early and Accurate Heart Disease Predication. Computational Intelligence and Neuroscience, 2022, 1–12. https://doi.org/10.1155/2022/1906466

Virani, S. S., Alonso, A., Aparicio, H. J., Benjamin, E. J., Bittencourt, M. S., Callaway, C. W., … Tsao, C. W. (2021). Heart Disease and Stroke Statistics—2021 Update. Circulation, 143(8), E254–E743. https://doi.org/10.1161/CIR.0000000000000950

Yadav, S. S. (2020). Application of Machine Learning for the Detection of Heart Disease. (Icimia), 165–172.

Zuama, R. A., Rahmatullah, S., & Yuliani, Y. (2022). Analisis Performa Algoritma Machine Learning pada Prediksi Penyakit Cerebrovascular Accidents. Jurnal Media Informatika Budidarma, 6(1), 531. https://doi.org/10.30865/mib.v6i1.3488

Published
2024-09-30
How to Cite
Sugitha, I. K., Triayudi, A., & Handayani, E. (2024). CLASSIFICATION OF HEART DISEASE USING THE K-NEAREST NEIGHBOR ALGORITHM AND LOGISTIC REGRESSION. Jurnal Pilar Nusa Mandiri, 20(2), 183-190. https://doi.org/10.33480/pilar.v20i2.5742