Analisis prediksi mortalitas pada pasien gagal jantung menggunakan perbandingan algoritma support vector machine dan k-nearest neighbors
Abstract
Heart failure is one of the leading causes of mortality worldwide, requiring accurate prediction methods to support early detection and medical decision-making. This study compares the performance of Support Vector Machine (SVM) and K-Nearest Neighbors (KNN) algorithms in predicting mortality among heart failure patients. The dataset used is the Heart Failure Clinical Records Dataset, consisting of 299 patient records with 13 clinical features, including age, ejection fraction, creatinine level, hypertension, anemia, and smoking status. The research process involved data preprocessing, feature standardization, model training, and evaluation using accuracy, precision, recall, F1-score, and balanced accuracy. The results indicate that SVM achieved superior performance with 0.80 accuracy, 0.84 precision, 0.70 recall, and 0.72 F1-score, while KNN reached only 0.68 accuracy and 0.52 F1-score. These findings demonstrate that SVM is more reliable in detecting mortality risk in heart failure patients, especially under imbalanced data conditions. This research provides valuable insights for the development of machine learning-based medical decision support systems, enabling healthcare professionals to perform earlier and more targeted interventions.
Downloads
References
Adi, S., & Wintarti, A. (2022). Komparasi Metode Support Vector Machine (Svm), K-Nearest Neighbors (Knn), Dan Random Forest (Rf) Untuk Prediksi Penyakit Gagal Jantung. MATHunesa: Jurnal Ilmiah Matematika, 10(2), 258–268. https://doi.org/10.26740/mathunesa.v10n2.p258-268
Assegie, T. A. (2021). Heart disease prediction model with k-nearest neighbor algorithm. International Journal of Informatics and Communication Technology (IJ-ICT), 10(3), 225. https://doi.org/10.11591/ijict.v10i3.pp225-230
Iacobescu, P., Marina, V., Anghel, C., & Anghele, A. D. (2024). Evaluating Binary Classifiers for Cardiovascular Disease Prediction: Enhancing Early Diagnostic Capabilities. Journal of Cardiovascular Development and Disease, 11(12), 1–17. https://doi.org/10.3390/jcdd11120396
jabbar, M. A., Deekshatulu, B. L., & Chandra, P. (2013). Classification of Heart Disease Using K- Nearest Neighbor and Genetic Algorithm. Procedia Technology, 10, 85–94. https://doi.org/10.1016/j.protcy.2013.12.340
Maulidan, M. I., Gunawan, G., & Fajar, M. Y. (2023). Perbandingan Algoritma K-Nearest Neighbor, Greedy dan Brute Force dalam Menentukan Rute Pengiriman Barang. Bandung Conference Series: Mathematics, 3(1), 35–43. https://doi.org/10.29313/bcsm.v3i1.6403
Nuraeni, N., & Faisal, M. (2025). Classification of sleep disorders using support vector machine. 4(1). https://doi.org/10.22219/kinetik.v10i1.2054
Rahmah, M. (2025). Analisis Sentimen Berbasis Aspek Terhadap Ulasan Pengguna di Treaveloka Menggunakan Metode Support Vector Machine.
Romadhon, M. R., Faisal, M., & Imamudin, M. (2023). Improving The Performance of the K-Nearest Neighbor Algorithm in the Selection of KIP Scholarship Recipients. Jurnal Riset Informatika, 5(4), 465–470. https://doi.org/10.34288/jri.v5i4.575
Souza, V. S., & Lima, D. A. (2025). Cardiac Disease Diagnosis Using K-Nearest Neighbor Algorithm: A Study on Heart Failure Clinical Records Dataset. Artificial Intelligence and Applications, 3(1), 56–71. https://doi.org/10.47852/bonviewAIA42022045
Copyright (c) 2025 Siti Nur Maghfiroh

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement 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 acknowledgement 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.



