Early Detection of Cardiovascular Disease Risk Using the K-Nearest Neighbors Algorithm
DOI:
https://doi.org/10.55123/jomlai.v5i2.5430Keywords:
Cardiovascular, KNN, K-Nearest Neighbors, Prediction, Machine Learning, Model EvaluationAbstract
Health is a fundamental aspect in determining the quality of human life. Along with changes in lifestyle and environmental conditions, various new challenges have emerged in the healthcare sector. Technological advancements, particularly in artificial intelligence, have opened significant opportunities for the development of more accurate and efficient healthcare systems. One of the most rapidly growing applications of AI is machine learning for disease prediction. This study aims to develop a model for predicting the risk of cardiovascular disease using the K-Nearest Neighbors (KNN) algorithm. The “Cardiovascular Disease” dataset from Kaggle, consisting of 68,205 entries and 17 medical attributes, was used as the basis. The research stages included data preprocessing (cleaning, categorical transformation, and normalization), selection of key features, model training, and performance evaluation. The dataset was split into 80% training data and 20% testing data. The experiment showed that k = 41 achieved the highest accuracy of 73%. Evaluation using precision, recall, and f1-score indicated fairly good performance, particularly in identifying high-risk patients. This model has the potential to serve as a decision-support tool for early detection of cardiovascular disease, enabling more accurate and preventive medical actions..
References
[1] B. Prabowo, A. Albar, and R. Salim, “Optimalisasi Kesadaran Kesehatan Warga Desa Sarirogo dengan Sosialisasi Hidup Sehat dan Implementasi Medical Check-up,”, Fundamentum: Jurnal Pengabdian Multidisiplin, Vol. 2, No. 3, PP. 70–77, Agustus 2024.
[2] R. H. Cahya, A. M. Riadhino, N. R. Adityama and T. L. M. Suryanto, “Sinergi AI Dan Machine Learning Untuk Prediksi Multikeluhan Pada Diagnosis Penyakit Kepala,”, JATI: Jurnal Mahasiswa Teknik Informatika, Vol. 9, No. 1, PP. 1469–1476, Februari 2025.
[3] Raspiyahni and Susilawati, “Penerapan Teknologi AI Untuk Meningkatkan Kesehatan Dan Keselamatan Kerja Di Industri Manufaktur,”, GJMI: Gudang Jurnal Multidisiplin Ilmu, Vol. 2, No. 6, PP. 651–655, Juni 2024.
[4] M. Martiningsih and A. Haris, “Risiko Penyakit Kardiovaskuler Pada Peserta Program Pengelolaan Penyakit Kronis (Prolanis) Di Puskesmas Kota Bima: Korelasinya Dengan Ankle Brachial Index Dan Obesitas,”, Jurnal Keperawatan Indonesia, Vol. 22, No. 3, PP. 200–208, September 2019.
[5] D. N. Hafila, Wisudawan, S. Darma, Nurhikmah and Dahlia, “Prevalensi Penyakit Kardiovaskular pada Masa Pandemic Tahun 2020-2021 di RS Arifin Nu’mang Kabupaten Sidrap,”, FAKUMI: Jurnal Mahasiswa Kedokteran, Vol. 3, No. 10, PP. 17–28, Oktober 2023.
[6] World Health Organization, “Cardiovascular diseases (CVDs),”, World Health Organization: WHO, 11 Juni 2021, [Online]. Tersedia: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds) [Diakses: 13 April 2025].
[7] J. Pane, L. Simorangkir, and P. Saragih, “Faktor-Faktor Risiko Penyakit Kardiovaskular Berbasis Masyarakat,”, JPPP: Jurnal Penelitian Perawat Profesional, Vol. 4, No. 4, PP. 1183–1192, September 2022.
[8] A. F. Umara, “Deteksi Dini Penyakit Jantung dan Pembuluh Darah Pegawai,”, Media Karya Kesehatan, Vol. 3, No. 2, PP. 122–133, November 2020.
[9] I. Akbar, F. Supriadi, and D. I. Junaedi, “Pemanfaatan Machine Learning Di Bidang Kesehatan,”, JATI: Jurnal Mahasiswa Teknik Informatika, Vol. 9, No. 1, PP. 1744–1749, Februari 2025.
[10] S. Dharmawan, V. Fernandes, and H. Halim, “Prediksi Serangan Jantung Dengan Menggunakan Metode Logistic Regression Classifier Dan Adaboost,”, Computatio: Journal of Computer Science and Information Systems, Vol. 10, No. 3, PP. 96–103, Januari 2024.
[11] I. K. A. Jayaditya and I. G. A. G. Kadyanan, “Implementasi Random Forest pada Klasifikasi Penyakit Kardiovaskular dengan Hyperparameter Tuning Grid Search,”, Jurnal Nasional Teknologi Informasi dan Aplikasinya, Vol. 2, No. 1, PP. 219–226, November 2023.
[12] V. Artanti, M. Faisal, and F. Kurniawan, “Klasifikasi Cardiovascular Diseases Menggunakan Algoritma K-Nearest Neighbors (KNN),”, Techno.COM, Vol. 23, No. 2, PP. 467–479, Mei 2024.
[13] Aidan, “Cardiovascular Disease,”, Kaggle, 2023, [Online]. Tersedia: https://www.kaggle.com/datasets/colewelkins/cardiovascular-disease/data [Diakses: 13 April 2025].
[14] J. Han, M. Kamber, and J. Pei, Data Mining: Concepts and Techniques, Edisi 3. United Kingdom: Elsevier Science, 2011.
[15] S. Sathyanarayanan and B. R. Tantri, “Confusion Matrix-Based Performance Evaluation Metrics,”, AJBR: African Journal of Biomedical Research, Vol. 27, No. 4s, PP. 4023–4031, November 2024.
[16] J. L. Rodgers, J. Jones, and S. I. Bolledu, “Cardiovascular Risks Associated with Gender and Aging,”, Journal of Cardiovascular Development and Disease, Vol. 6, No. 2, PP. 1–18, April 2019.
[17] M. Vaduganathan, G. Mensah, and J. V. Turco, “The Global Burden of Cardiovascular Diseases and Risk: A Compass for Future Health,”, JACC: Journals of the American College of Cardiology, Vol. 80, No. 25, PP. 2361–2371, December 2022.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Leo Fernandy, Leonardo Leonardo, Stanley Lim, Vincent Liawis, Ade Maulana

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright (c) 2022 The authors. Published by Yayasan Literasi Indonesia
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
The author(s) whose article is published in the JOMLAI journal attain the copyright for their article and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. By submitting the manuscript to JOMLAI, the author(s) agree with this policy. No special document approval is required.
The author(s) guarantee that:their article is original, written by the mentioned author(s),
- has never been published before,
- does not contain statements that violate the law, and
- does not violate the rights of others, is subject to copyright held exclusively by the author(s), and is free from the rights of third parties, and that the necessary written permission to quote from other sources has been obtained by the author(s).
The author(s) retain all rights to the published work, such as (but not limited to) the following rights:
- Copyright and other proprietary rights related to the article, such as patents,
- The right to use the substance of the article in its own future works, including lectures and books,
- The right to reproduce the article for its own purposes,
- The right to archive all versions of the article in any repository, and
- The right to enter into separate additional contractual arrangements for the non-exclusive distribution of published versions of the article (for example, posting them to institutional repositories or publishing them in a book), acknowledging its initial publication in this journal (JOMLAI: Journal of Machine Learning and Artificial Intelligence).
Suppose the article was prepared jointly by more than one author. Each author submitting the manuscript warrants that all co-authors have given their permission to agree to copyright and license notices (agreements) on their behalf and notify co-authors of the terms of this policy. JOMLAI will not be held responsible for anything that may arise because of the writer's internal dispute. JOMLAI will only communicate with correspondence authors.
Authors should also understand that their articles (and any additional files, including data sets, and analysis/computation data) will become publicly available once published. The license of published articles (and additional data) will be governed by a Creative Commons Attribution-ShareAlike 4.0 International License. JOMLAI allows users to copy, distribute, display and perform work under license. Users need to attribute the author(s) and JOMLAI to distribute works in journals and other publication media. Unless otherwise stated, the author(s) is a public entity as soon as the article is published



















