Evaluasi Performa Random Forest Dengan Penyesuaian Threshold Klasifikasi Pada Prediksi Penyakit Jantung

Authors

  • Lidya Shafadhila Universitas Dharma Wacana
  • Andreas Perdana Universitas Dharma Wacana

DOI:

https://doi.org/10.29408/jit.v9i2.34799

Keywords:

False negative, Machine Learning, heart disease, Random Forest, threshold adjustment, Youden Index

Abstract

Heart disease remains one of the leading causes of death worldwide, necessitating an accurate prediction system to support early detection. This study aims to evaluate the performance of the Random Forest algorithm in predicting heart disease through the application of a threshold adjustment method. This research implements a Youden Index-based threshold adjustment, tested on the Statlog and Cleveland datasets, to assess the consistency of model performance across different data characteristics that share similar features. This method is utilized to determine the optimal threshold to achieve the best balance between recall and specificity. Additionally, the study analyzes the impact of threshold variations on accuracy, recall, specificity, and F1-score metrics to minimize false-negative errors and enhance the clinical relevance of the prediction results. Testing was conducted using the Cleveland Heart Disease Dataset and the Statlog Heart Disease Dataset with stratified sampling techniques. The results demonstrate that threshold adjustment significantly improves classification performance. The Cleveland dataset yielded an accuracy of 0.867, a recall of 0.893, and a Youden Index of 0.737 at an optimal threshold of 4.0, while the Statlog dataset achieved an accuracy of 0.833, a recall of 0.833, and a Youden Index of 0.667 at a threshold of 5.0. Overall, the combination of Random Forest and threshold adjustment proven to be effective in improving the quality of heart disease predictions.

Author Biography

Andreas Perdana, Universitas Dharma Wacana

Lecturer and research supervisor at the Informatics Engineering Study Program, Universitas Dharma Wacana, Indonesia.

References

[1] S. Swarna, G. Anil, P. Shivamani, and K. Madhu Babu, “Machine Learning Based Heart Disease Prediction Using Random Forest,” International Journal of Scientific Research in Engineering and Management, 2024, doi: 10.55041/IJSREM31320.

[2] M. D. Teja and G. M. Rayalu, “Optimizing heart disease diagnosis with advanced machine learning models: a comparison of predictive performance,” BMC Cardiovasc. Disord., vol. 25, no. 1, Dec. 2025, doi: 10.1186/s12872-025-04627-6.

[3] S. Rasheed, G. K. Kumar, D. M. Rani, M. V. V. P. Kantipudi, and M. Anila, “Heart Disease Prediction Using GridSearchCV and Random Forest,” EAI Endorsed Trans. Pervasive Health Technol., vol. 10, Jan. 2024, doi: 10.4108/eetpht.10.5523.

[4] Z. Noroozi, A. Orooji, and L. Erfannia, “Analyzing the impact of feature selection methods on machine learning algorithms for heart disease prediction,” Sci. Rep., vol. 13, no. 1, Dec. 2023, doi: 10.1038/s41598-023-49962-w.

[5] M. Kristanaya, Melinda Putri Azzahra, Trimono, and Mohammad Idhom, “Klasifikasi Status Rujukan Pasien Poliklinik Bandara Berbasis Random Forest dan Interpretabilitas Model Menggunakan SHAP,” Data Sciences Indonesia (DSI), vol. 5, no. 1, pp. 60–74, Jul. 2025, doi: 10.47709/dsi.v5i1.6078.

[6] E. W. Solang, F. X. Adu, A. Dharma, and N. Gunantara, “Machine Learning Evaluation for Hotel Cancellation Prediction with Threshold Adjustment and Cost-Based Evaluation,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 6, no. 1, pp. 193–204, Feb. 2026, doi: 10.57152/malcom.v6i1.2466.

[7] Y. H. Riskandya and A. Tjahyanto, “Integrasi Analytic Hierarchy Process (AHP)–Machine Learning yang Dinamis dalam Prediksi Risiko Kredit,” JURNAL LOCUS: Penelitian & Pengabdian, vol. 4, pp. 9448–9455, 2025.

[8] Y. Rimal, N. Sharma, S. Paudel, A. Alsadoon, M. P. Koirala, and S. Gill, “Comparative analysis of heart disease prediction using logistic regression, SVM, KNN, and random forest with cross-validation for improved accuracy,” Sci. Rep., vol. 15, no. 1, Dec. 2025, doi: 10.1038/s41598-025-93675-1.

[9] A. A. Lamir, S. Razzagzadeh, and Z. Rezaei, “A Comprehensive Machine Learning Framework for Heart Disease Prediction: Performance Evaluation and Future Perspectives,” in 3rd National Conference on Computing (QICAR), May 2025. Accessed: Apr. 20, 2026. [Online]. Available: https://arxiv.org/abs/2505.09969

[10] A. Naik, G. G. Tejani, and S. J. Mousavirad, “SGO enhanced random forest and extreme gradient boosting framework for heart disease prediction,” Sci. Rep., vol. 15, no. 1, Dec. 2025, doi: 10.1038/s41598-025-02525-7.

[11] O. A. Abioye and M. E. Irhebhude, “Big Data-Driven Health Risk Stratification: A Health Index-Based Approach Using Feature Importance and PySpark,” Journal of Computing Theories and Applications, vol. 2, no. 4, pp. 456–469, Mar. 2025, doi: 10.62411/jcta.12327.

[12] N. Chandrasekhar and S. Peddakrishna, “Enhancing Heart Disease Prediction Accuracy through Machine Learning Techniques and Optimization,” Processes, vol. 11, no. 4, pp. 1–31, Apr. 2023, doi: 10.3390/pr11041210.

[13] M. G. El-Shafiey, A. Hagag, E. S. A. El-Dahshan, and M. A. Ismail, “A hybrid GA and PSO optimized approach for heart-disease prediction based on random forest,” Multimed. Tools Appl., vol. 81, no. 13, pp. 18155–18179, May 2022, doi: 10.1007/s11042-022-12425-x.

[14] B. Kalaivani and A. Ranichitra, “Optimizing Cardiovascular Disease Prediction with a Hybrid Gradient Descent Adaptive Algorithm and Random Forest Classifier,” Oct. 2025. [Online]. Available: https://www.jisem-journal.com/

[15] K. Dissanayake and M. G. M. Johar, “Comparative study on heart disease prediction using feature selection techniques on classification algorithms,” Applied Computational Intelligence and Soft Computing, vol. 2021, 2021, doi: 10.1155/2021/5581806.

[16] A. Sudianto, B. A. C. Permana, Muhammad Wasil, and Harianto, “Penerapan Sistem Payment Gateway Pada E-Commerce Sebagai Upaya Peningkatan Penjualan”, INFOTEK, vol. 8, no. 1, pp. 271–279, Jan. 2025. doi: 10.29408/jit.v8i1.28323

Downloads

Published

21-07-2026

How to Cite

Shafadhila, L., & Perdana, A. (2026). Evaluasi Performa Random Forest Dengan Penyesuaian Threshold Klasifikasi Pada Prediksi Penyakit Jantung. Infotek: Jurnal Informatika Dan Teknologi, 9(2), 432–442. https://doi.org/10.29408/jit.v9i2.34799

Similar Articles

1 2 3 4 5 6 7 8 9 10 > >> 

You may also start an advanced similarity search for this article.