PERFORMANCE COMPARISON OF LOGISTIC REGRESSION, RANDOM FOREST, AND XGBOOST WITH SMOTE AND HYPERPARAMETER TUNING IN THE CLASSIFICATION OF ACUTE MYOCARDIAL INFARCTION
Nur Insani, Departemen Pendidikan Matematika, Universitas Negeri Yogyakarta; Mathematical & Geospatial Science, School of Science, RMIT University, Melbourne Australia 3000
Abstract
Acute myocardial infarction (AMI) is one of the leading causes of death from cardiovascular disease worldwide. Delayed treatment can lead to various complications ranging from heart failure to sudden death; therefore, early detection is essential to reduce mortality from AMI. This study aims to conduct a comparative analysis of the Logistic Regression, Random Forest, and XGBoost models for AMI classification. To address the issue of class imbalance in medical data and optimize model performance, the Synthetic Minority Oversampling Technique (SMOTE) was applied, along with hyperparameter tuning using Randomized Search Cross-Validation. Model performance was evaluated using the Area Under the Curve (AUC), recall, precision, F1-score, and accuracy. The results of the study show that the application of SMOTE and hyperparameter tuning has varying effects, particularly on Logistic Regression, which experienced a significant improvement. XGBoost demonstrated stable performance across all scenarios, while Random Forest with SMOTE produced the highest performance and the lowest number of prediction errors, achieving a recall of 1.000, precision of 0.992, and ROC-AUC of 0.999. Thus, XGBoost excels in terms of stability, while Random Forest is more accurate and reliable in terms of minimizing prediction errors in the classification of Acute Myocardial Infarction.
Keywords: Acute Myocardial Infarction (AMI), Extreme Gradient Boosting, Hyperparameter Tuning, Logistic Regression, Random Forest, Synthetic Minority Oversampling Technique (SMOTE)
Full Text:
PDFReferences
Amaliah, R., Yaswir, R., & Prihandani, T. (2019). Gambaran homosistein pada pasien infark miokard akut di RSUP Dr. M. Djamil Padang. Jurnal Kesehatan Andalas, 8(2), 351-355. https://doi.org/10.25077/jka.v8i2.1012
Asshidiq, L., Wisudawan, & Deus, T. (2025). Infark Miokard di Indonesia: Tinjauan Literatur Terbaru terhadap Faktor Risiko, Karakteristik Klinis, Manajemen Keperawatan, dan Prediktor Prognostik. Jurnal Riset Rumpun Ilmu Kedokteran, 4(3), 87–95. https://doi.org/10.55606/jurrike.v4i3.6653
Azhar, I. S. B., & Sari, W. K. (2022). Penerapan Data Mining Dan Tekonologi Machine Learning Pada Klasifikasi Penyakit Jantung. JSI: Jurnal Sistem Informasi (E-Journal), 14(1), 2560-2568. https://doi.org/10.18495/jsi.v14i1.65
CardioSmart. (2015, September 1). Ventricular Tachycardia. Retrieved from CardioSmart American College of Cardiology: https://www.cardiosmart.org/topics/ventricular-tachycardia
Chaudhry, A. N. (2024, Juni 20). Logistic Regression Implementation From Scratch—A Step By Step Approach. Retrieved from Medium: https://medium.com/@chaudhryalinaeem/logistic-regression-implementation-from-scratch-a-step-by-step-approach-69e7e3ee866b
Cutler, A., Cutler, D. R., & Stevens, J. R. (2012). Random Forests. In C. Zhang & Y. Ma (Eds.). Ensemble Machine Learning. New York: Springer New York, pp. 157-175. https://doi.org/10.1007/978-1-4419-9326-7_5
Davidson, D. M. (1994). An introduction to cardiovascular disease. In Social support and cardiovascular disease (pp. 3-19). Boston, MA: Springer US. https://doi.org/10.1007/978-1-4899-2572-5_1
Fajriyah, R., Isnandar, H. A., & Arifuddin, A. (2024). Gene Markers Identification Of Acute Myocardial Infarction Disease Based On Genomic Profiling Through Extreme Gradient Boosting (XGBoost). Media Statistika, 17(1), 69-80. https://doi.org/10.14710/medstat.17.1.69-80
Han, S., Kim, H., & Lee, Y. S. (2020). Double random forest. Machine Learning, 109(8), 1569-1586. https://doi.org/10.1007/s10994-020-05889-1
Kumar, V. (2021). Evaluation of computationally intelligent techniques for breast cancer diagnosis. Neural Computing and Applications, 33(8), 3195-3208. https://doi.org/10.1007/s00521-020-05204-y
Kurnia, S., Nurdin, & Khaidar, A. (2025). Perbandingan Metode Machine Learning Menggunakan Metode Support Vector Machine dan Artificial Neural Network dalam Memprediksi Serangan Jantung. Jurnal Informatika Kaputama (JIK), 9(2), 87-94. https://doi.org/10.59697/jik.v9i2.1020
Mandias, G. F., & Manoppo, I. J. (2025). Penerapan Model Machine Learning untuk Memprediksi Serangan Jantung Dini. Jurnal Ilmiah Matrik, 27(2), 193-201. https://doi.org/10.33557/2cg02a51
Mechanic, O. J., Gavin, M., Grossman, S. A. (2023). Acute myocardial infarction. In StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing. https://www.ncbi.nlm.nih.gov/books/NBK459269/
Omarzai, F. (2024, Juli 21). XGBoost Classification in Depth. Retrieved from Medium: https://medium.com/@fraidoonomarzai99/xgboost-classification-in-depth-979f11ef4bf9
Pangaribuan, J. J., Tanjaya, H., & Kenichi, K. (2021). Mendeteksi penyakit jantung menggunakan machine learning dengan algoritma logistic regression. Journal Information System Development (ISD), 6(2), 1-10.
Prasetya, F. P., & Rosa, P. P. (2024). Klasifikasi Kegagalan Pembayaran Kredit Nasabah Bank dengan Algoritma XGBoost. In Seminar Nasional Informatika Bela Negara (SANTIKA) (Vol. 4, No. 1, pp. 366-371).
Raharjo, F. A. A. D., Maghfiroh, I. L., & Rokhman, A. (2025). Faktor-faktor resiko serangan infark miokard akut: Risk factors for acute myocardial infarction attack. Jurnal Ilmiah Keperawatan (Scientific Journal of Nursing), 11(3), 563-572. https://doi.org/10.33023/jikep.v11i3.2769
Rahayu, W., Jollyta, D., Hajjah, A., Johan, Gusrianty, Gustientiedina, . . . Desnelita, Y. (2024). Synthetic minority oversampling technique (SMOTE) for boosting the accuracy of C4. 5 algorithm model. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 3(3), 624-630. https://doi.org/10.59934/jaiea.v3i3.469
Rahmada, A., & Susanto, E. R. (2024). Peningkatan akurasi prediksi penyakit jantung dengan teknik SMOTEENN pada algoritma random forest. Jurnal Pendidikan dan Teknologi Indonesia (JPTI), 4(12), 795-803. https://doi.org/10.52436/1.jpti.524
Rashid, T. A., & Hassan, B. (2022, November 23). Heart Attack Dataset. Mendeley Data, V1. https://doi.org/10.17632/wmhctcrt5v.1
Reátegui, R., Tandazo-Malla, C., Suárez, R., & Ramírez-Cerna, L. (2025). Cardiovascular risk prediction via ensemble machine learning and oversampling methods. Scientific Reports, 15, 43576. https://doi.org/10.1038/s41598-025-30895-5
Rhomadon, M. F., Wydyanto, Mirza, A. H., & Huda, N. (2025). Penerapan Algoritma Logistic Regression Untuk Memprediksi Penyakit Jantung. Jurnal Informatika dan Tekonologi Komputer (JITEK), 5(3), 133–147. https://doi.org/10.55606/jitek.v5i3.8105
Salman, I. (2019). Heart attack mortality prediction: an application of machine learning methods. Turkish Journal of Electrical Engineering and Computer Sciences, 27(6), 4378-4389. https://doi.org/10.3906/elk-1811-4
Song, X., Liu, X., Liu, F., & Wang, C. (2021). Comparison of machine learning and logistic regression models in predicting acute kidney injury: a systematic review and meta-analysis. International journal of medical informatics, 151, 104484. https://doi.org/10.1016/j.ijmedinf.2021.104484
Tajali, A., Saragih, T. H., Mazdadi, M. I., Budiman, I., & Farmadi, A. (2024). The Impactness of SMOTE as Imbalance Class Handling for Myocardial Infarction Complication Classification using Machine Learning Approach with Data Imputation and Hyperparameter. Indonesian Journal of Electronics, Electromedical Engineering, and Medical Informatics, 6(4), 227-239. https://doi.org/10.35882/ijeeemi.v6i4.13
WHO (World Health Organization). (2025, Juli 31). Cardiovascular Diseases (CVDs). Retrieved from World Health Organization: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds)
Widodo, S., Brawijaya, H., & Samudi, S. (2022). Stratified K-fold cross validation optimization on machine learning for prediction. Sinkron: jurnal dan penelitian teknik informatika, 6(4), 2407-2414. https://doi.org/10.33395/sinkron.v7i4.11792
DOI: https://doi.org/10.21831/jktm.v12i2.28433
Refbacks
- There are currently no refbacks.
Online ISSN (e-ISSN): 3031-1152
![]() | Jurnal Kajian dan Terapan Matematika by https://journal.student.uny.ac.id/index.php/jktm/index is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. |





ISSN Online