Analysis of the Effect of SMOTE on the Performance of Random Forest in Classifying the Risk of Death in Heart Failure Patients


Authors

  • Alyiza Dwi Ningtyas Politeknik Negeri Medan, Medan, Indonesia
  • Rama Prameswara Ritonga Politeknik Negeri Medan, Medan, Indonesia
  • Rizka Salsabila Riadi Politeknik Negeri Medan, Medan, Indonesia
  • Arif Hamied Nababan Politeknik Negeri Medan, Medan, Indonesia
  • Surizar Rahmi Danur Institut Teknologi dan Bisnis Indonesia, Medan, Indonesia

DOI:

https://doi.org/10.47065/bulletincsr.v6i6.1341

Keywords:

Heart Failure; Random Forest; SMOTE; Classification; Stratified 5-Fold Cross-Validation

Abstract

Class distribution imbalance in the heart failure patient dataset has the potential to affect the ability of the classification model to identify patients experiencing death events. This study aims to analyze the effect of the Synthetic Minority Over-sampling Technique (SMOTE) application on the performance of the Random Forest algorithm in classifying death events in heart failure patients. The dataset used is the Heart Failure Clinical Records Dataset consisting of 299 patient data, with 12 predictor attributes and one target attribute, namely DEATH EVENT. Data processing was carried out using the Python programming language through the Google Colab platform. The research stages include data preparation, dataset division with a ratio of 80:20, application of SMOTE to training data, formation of a Random Forest model, and performance evaluation using accuracy, precision, recall, and F1-score metrics. In addition, Stratified 5-Fold Cross-Validation was applied as an additional evaluation to analyze model performance on several data divisions. The test results with an 80:20 data split showed that the model before and after applying SMOTE produced an accuracy value of 83.33%, a positive class precision of 80.00%, a recall of 63.16%, and an F1-score of 70.59%. Meanwhile, the results of Stratified 5-Fold Cross-Validation showed that the application of SMOTE increased the average recall value from 69.74% to 76.00% and the F1-score from 73.34% to 74.75%. However, the average accuracy value decreased from 83.93% to 83.60%, while the precision decreased from 77.93% to 73.74%. These findings indicate that the application of SMOTE has the potential to improve the ability of Random Forest in identifying patients with the label DEATH EVENT = 1, although it does not improve all evaluation metrics. This study is expected to provide an empirical contribution in evaluating the effectiveness of SMOTE in classifying imbalanced medical data, especially in improving the detection ability of minority classes.

Downloads

Download data is not yet available.

References

J. P. Anggraini and A. Desiani, "Comparison of Random Forest and Extreme Gradient Boosting (XGBoost) Algorithms in the Classification of Heart Failure Diseases," Computing J. Sist. Computing., vol. 14, no. 2, pp. 149–157, 2025.

S. K. N. A. Putri, I. Jumiatin, I. Sulistia, N. A. B. Saputra, and N. Wiranda, "Implementation of Hyperparameter Tuning for Classification Models in Heart Disease Risk Prediction," MALCOM Indonesia. J. Mach. Learn. Comput. Sci., vol. 5, no. 4, pp. 1181–1189, 2025.

K. Wirastuti, N. S. Riasari, D. Djannah, and M. Silviana, "Stroke Prevention Efforts through Stroke Risk Score Screening with Counseling Intervention and Examination of Stroke Risk Factors in Bojong Salaman Village, South Pusponjolo District, West Semarang," J. ABDIMAS-KU J. Servant. Masy. Doctor., vol. 2, no. 1, pp. 23–29, Jan. 2023, doi: 10.30659/abdimasku.2.1.23-29.

M. N. Sidqi, "Comparison of Performance of Random Forest and Decision Tree Algorithms in Classification of Heart Diseases," J. Art. Intell. Multimed. Informatics, vol. 3, no. 1, pp. 1–14, 2026.

A. Guardi, Z. Saputra, and F. Budiman, "Comparative Analysis of Random Forest and XGBoost Models for Classification of Heart Disease Based on Clinical Data," JURIKOM (Journal of Ris. Computer), vol. 13, no. 1, pp. 254–264, 2026, doi: 10.30865/jurikom.v13i1.9427.

A. Rohman and S. Mujiyono, "Performance Analysis of Machine Learning Algorithms for Heart Disease Prediction Using Integrated Data Preprocessing Methods," Multimatrix J. Computational Science., vol. 5, no. 1, pp. 18–22, 2023.

C. Arafat et al., "Comparison of Random Forest and Xgboost Algorithms for Classification of Heart Disease Based on Medical Data," J. Fasilcom, vol. 15, no. 2, pp. 430–435, 2025.

P. Dewandra, I. G. Susrama, M. Diyasa, A. D. Rahajoe, and A. P. Previously, "Comparison of Random Forest and XGBoost Algorithms in the Classification of Stunting Status in Toddlers Based on Anthropometric Data," Semin. Nas. Inform. Defending the State ISSN, vol. 6, pp. 108–112, 2026.

A. Setyawan, N. Sulistianingsih, and R. Rismayati, "Comparison of Machine Learning Algorithms for Heart Failure Detection Based on RFECV Feature Selection and SMOTE Data Balancing," Semin. Nas. Corisindo, vol. 3, no. September 2025, pp. 622–628, 2025.

N. L. Desmita, S. Lonang, and D. T. Kumoro, "Comparative Analysis Of Decision Tree And Random Forest Algorithms For Predicting Diabetes Mellitus," SainsTech Innov. J., vol. 8, 2025.

E. M. Z. Darmawan and A. Fauzan Dianta, "Implementation of GridSearchCV Hyperparameter Optimization in a Heart Attack Prediction System Using SVM," Technological. J. Ilm. Sist. Inf., vol. 13, no. 1, pp. 8–15, 2023.

R. Ridwan, H. H. Handayani, S. A. P. Lestari, and Y. Cahyana, "Performance Evaluation of Random Forest and Gradient Boosting Algorithms for Classification of Heart Disease," J. Komtika (Computing and Inform., vol. 9, no. 1, pp. 112–124, 2025.

U. Hasanah, A. M. Soleh, and K. Sadik, “Effect of Random Under sampling, Oversampling, and SMOTE on the Performance of Cardiovascular Disease Prediction Models,” J. Matt. Stat. and Computing, vol. 21, no. 1, pp. 88–102, 2024.

Z. Fatah and I. Addewiyah, "Application of Random Forest Algorithm and SMOTE Technique for Prediction of Death Due to Heart Failure Using RapidMiner," J. Jamastika, vol. 4, 2025.

D. Scrutiny et al., "Prediction of mortality in heart failure by machine learning. Comparison with statistical modeling," Eur. J. Intern. Med., vol. 133, pp. 106–112, Mar. 2025, doi: 10.1016/j.ejim.2025.01.020.

M. A. Faradeya and E. R. Subhiyakto, "Classification of Heart Failure Disease Using a Naive Bayes Algorithm," J. Algorithm. Technology Engineer. Garut, pp. 115–127, 2025, doi: 10.33364/algorithm/v.22-1.2178.

M. Armin, N. Arifin, and S. A. Rachmini, "Application of Random Forest Algorithm with Recursive Feature Elimination (RFE) Selection for Classification of Heart Failure," J. Sist. Computing. and Artificial Intelligence, vol. IX, pp. 303–311, 2026.

M. R. A. Pramudya, C. Arafat, M. C. Ramadhan, F. A. Jafar, and E. Ismanto, "Comparison of Random Forest and Xgboost Algorithms for Classification of Heart Disease Based on Medical Data," J. Fasilkom, vol. 15, no. 2, pp. 430–435, 2025.

F. Ferdianto, H. R. Ardiyanto, R. Alkazim, and F. Fathoni, "Prediction Of Heart Disease With Variables Of Metabolic Disease History And Smoking Habits Using Random Forest And Xgboost Algorithms," JATI (Journal of Mhs. Tek. Inform., vol. 10, no. 4, pp. 7255–7260, 2026.

S. A. S. Mola, Y. C. Luttu, and D. N. Rumlaklak, "Comparison of Machine Learning Methods in the Sentiment Analysis of InDriver Application User Comments on Unbalanced Datasets," J. Sist. Business Inf., vol. 14, no. 3, pp. 247–255, 2024, doi: 10.21456/vol14iss3pp247-255.

M. Metode, R. Forest, C. Putri, W. Kase, S. Yulianto, and J. Prasetyo, "Analysis of Stunting Risk Factors in Toddlers in Kesetnana Village," J. Indonesian. Management. Inform. and Commun., vol. 6, no. 3, pp. 1556–1566, 2025.

S. Lestanti et al., "Stunting Classification Using Random Forest Classifier," JATI (Journal of Student Tech. Inform., vol. 7, no. 6, pp. 3846–3851, 2023.

A. Fitri, I. Afrianty, E. Budianita, and S. K. Gusti, "Implementation of Feature Selection Information Gain in Support Vector Machine Method for Stroke Disease Classification," Bull. Informatics Data Sci., vol. 4, no. 1, pp. 22–33, May 2025, doi: 10.61944/bids.v4i1.116.

A. Syaadah, A. A. Fadhilah, and I. Daulay, "Prediction of Heart Disease with Random Forest through Imputation and Feature Scaling Techniques in Data Preprocessing," J. Sist. Inf. Computer., vol. 1, no. 1, pp. 73–92, 2024.

T. Z. Jasman, M. A. Fadhlullah, A. L. Pratama, and R. Rismayani, "Analysis of Gradient Boosting, Adaboost and Catboost Algorithms in Water Quality Classification," J. Tek. Inform. and Sist. Inf., vol. 8, no. 2, pp. 392–402, 2022, doi: 10.28932/jutisi.v8i2.4906.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Analysis of the Effect of SMOTE on the Performance of Random Forest in Classifying the Risk of Death in Heart Failure Patients

Dimensions Badge

ARTICLE HISTORY

Published: 2026-10-31

Abstract View: 3 times
PDF Download: 4 times

How to Cite

Ningtyas, A. D. ., Ritonga, R. P., Riadi, R. S., Nababan, A. H., & Danur, S. R. (2026). Analysis of the Effect of SMOTE on the Performance of Random Forest in Classifying the Risk of Death in Heart Failure Patients. Bulletin of Computer Science Research, 6(6), 2660-2668. https://doi.org/10.47065/bulletincsr.v6i6.1341

Issue

Section

Articles

Most read articles by the same author(s)