Robust Predictive Model for Heart Disease Diagnosis Using Advanced Machine Learning Techniques

Rini Sovia, M. Khairul Anam, Irzal Arief Wisky, Randy Permana, Nadya Alinda Rahmi, Ruri Hartika Zain

Abstract


This study presents a hybrid ensemble learning framework designed to enhance the predictive accuracy, robustness, and generalizability of heart disease classification models. The framework integrates three base classifiers: Decision Tree (DT), Gaussian Naive Bayes (GNB), and K Nearest Neighbor (KNN), which are combined using a stacking ensemble method with Logistic Regression (LR) as the meta learner. Each classifier contributes a distinct analytical perspective: DT models nonlinear relationships, GNB provides probabilistic reasoning, and KNN captures similarity-based patterns. Logistic Regression aggregates their outputs to produce a unified predictive decision. To mitigate class imbalance commonly observed in clinical datasets, the Synthetic Minority Oversampling Technique (SMOTE) is applied to generate synthetic samples of the minority class, improving the model’s ability to recognize underrepresented cases. Hyperparameter optimization is performed using the Optuna framework, which applies the algorithm to efficiently explore parameter configurations. The proposed model was evaluated on a publicly available heart disease dataset and achieved an accuracy of 99.61%, precision of 99.62%, recall of 99.59%, F1 score of 99.60%, and specificity of 99.58%, corresponding to a false positive rate of only 0.42 percent. These results demonstrate the framework’s strong ability to accurately identify heart disease cases while minimizing misclassification. The integration of SMOTE, stacking, and Optuna optimization contributes to its superior performance and robustness. Consequently, this approach shows strong potential for integration into clinical decision support systems to assist healthcare professionals in reliable and timely diagnosis.


Keywords


Heart disease; Ensemble Learning; Stacking; Optuna; Classification

Full Text:

PDF

References


R. R. Sarra, I. I. Gorial, R. R. Manea, A. E. Korial, M. Mohammed, and Y. Ahmed, “Enhanced Stacked Ensemble-Based Heart Disease Prediction with Chi-Square Feature Selection Method,” Journal of Robotics and Control (JRC), vol. 5, no. 6, pp. 1753–1763, 2024, doi: 10.18196/jrc.v5i6.23191.

M. K. Anam, M. B. Firdaus, F. Suandi, Lathifah, T. Nasution, and S. Fadly, “Performance Improvement of Machine Learning Algorithm Using Ensemble Method on Text Mining,” in ICFTSS 2024 - International Conference on Future Technologies for Smart Society, Kuala Lumpur: Institute of Electrical and Electronics Engineers Inc., Sep. 2024, pp. 90–95. doi: 10.1109/ICFTSS61109.2024.10691363.

P. Natha and P. RajaRajeswari, “Advancing Skin Cancer Prediction Using Ensemble Models,” Computers, vol. 13, no. 7, pp. 1–24, Jul. 2024, doi: 10.3390/computers13070157.

P. Mahajan, S. Uddin, F. Hajati, and M. A. Moni, “Ensemble Learning for Disease Prediction: A Review,” Jun. 01, 2023, MDPI. doi: 10.3390/healthcare11121808.

M. K. Anam, T. P. Lestari, H. Yenni, T. Nasution, and M. B. Firdaus, “Enhancement of Machine Learning Algorithm in Fine-grained Sentiment Analysis Using the Ensemble,” ECTI Transactions on Computer and Information Technology (ECTI-CIT), vol. 19, no. 2, pp. 159–167, Mar. 2025, doi: 10.37936/ecti-cit.2025192.257815.

L. L. Van FC, M. K. Anam, S. Bukhori, A. K. Mahamad, S. Saon, and R. L. V. Nyoto, “The Development of Stacking Techniques in Machine Learning for Breast Cancer Detection,” Journal of Applied Data Sciences, vol. 6, no. 1, pp. 71–85, Jan. 2025, doi: 10.47738/jads.v6i1.416.

N. S. Sediatmoko, Y. Nataliani, and I. Suryady, “Sentiment Analysis of Customer Review Using Classification Algorithms and SMOTE for Handling Imbalanced Class,” Indonesian Journal of Information Systems, vol. 7, no. 1, pp. 38–52, 2024, doi: 10.24002/ijis.v7i1.8879.

S. Hadianti and W. A. G. Kodri, “Optimization of The Machine Learning Approach using Optuna in Heart Disease Prediction,” Journal Medical Informatics Technology, vol. 1, no. 3, pp. 59–64, Sep. 2023, doi: 10.37034/medinftech.v1i3.15.

A. A. Ahmad and H. Polat, “Prediction of Heart Disease Based on Machine Learning Using Jellyfish Optimization Algorithm,” Diagnostics, vol. 13, no. 14, pp. 1–17, Jul. 2023, doi: 10.3390/diagnostics13142392.

A. Bustillo, R. Reis, A. R. Machado, and D. Y. Pimenov, “Improving the accuracy of machine-learning models with data from machine test repetitions,” J Intell Manuf, vol. 33, no. 1, pp. 203–221, Jan. 2022, doi: 10.1007/s10845-020-01661-3.

H. Nizam-Ozogur and Z. Orman, “A heuristic-based hybrid sampling method using a combination of SMOTE and ENN for imbalanced health data,” Expert Syst, vol. 41, no. 8, pp. 1–22, Aug. 2024, doi: 10.1111/exsy.13596.

A. Masitha and M. Kunta Biddinika, “Preparing Dual Data Normalization for KNN Classfication in Prediction of Heart Failure,” KLIK, vol. 4, no. 3, pp. 1227–1234, 2023, doi: 10.30865/klik.v4i3.1382.

Widiharto, M. Arief Soeleman, and A. Syukur, “Performance Improvement of Naïve Bayes Algorithm Based on Information Gain and Forward Selection Features Selection for Heart Disease Classification,” IOSR Journal of Mobile Computing & Application, vol. 9, no. 6, pp. 54–64, 2022, doi: 10.9790/0050-09065464.

T. Karadeniz, H. H. Maraş, G. Tokdemir, and H. Ergezer, “Two Majority Voting Classifiers Applied to Heart Disease Prediction,” Applied Sciences (Switzerland), vol. 13, no. 6, pp. 1–13, Mar. 2023, doi: 10.3390/app13063767.

A. Ghasemieh, A. Lloyed, P. Bahrami, P. Vajar, and R. Kashef, “A novel machine learning model with Stacking Ensemble Learner for predicting emergency readmission of heart-disease patients,” Decision Analytics Journal, vol. 7, pp. 1–13, Jun. 2023, doi: 10.1016/j.dajour.2023.100242.

W. Agwil, H. Fransiska, and N. Hidayati, “Analysis of Student Graduation Timeliness Using Bagging CART,” FIBONACCI: Jurnal Pendidikan Matematika dan Matematika, vol. 6, no. 2, pp. 155–166, Dec. 2020, doi: 10.24853/fbc.6.2.155-166.

R. M. Syafei and D. A. Efrilianda, “Machine Learning Model Using Extreme Gradient Boosting (XGBoost) Feature Importance and Light Gradient Boosting Machine (LightGBM) to Improve Accurate Prediction of Bankruptcy,” Recursive Journal of Informatics, vol. 1, no. 2, pp. 64–72, Sep. 2023, doi: 10.15294/rji.v1i2.71229.

M. M. R. Mubarak, Y. H. Chrisnanto, and P. N. Sabrina, “Implementation of Random Forest Using Smote and Smoteenn in Customer Churn Classification in E-Commerce,” Enrichment: Journal of Multidisciplinary Research and Development, vol. 1, no. 8, pp. 463–477, Nov. 2023, doi: 10.55324/enrichment.v1i8.69.

N. G. Ramadhan, “Comparative Analysis of ADASYN-SVM and SMOTE-SVM Methods on the Detection of Type 2 Diabetes Mellitus,” Scientific Journal of Informatics, vol. 8, no. 2, pp. 276–282, Nov. 2021, doi: 10.15294/sji.v8i2.32484.

P. Srinivas and R. Katarya, “hyOPTXg: OPTUNA hyper-parameter optimization framework for predicting cardiovascular disease using XGBoost,” Biomed Signal Process Control, vol. 73, no. 1, pp. 1–10, Mar. 2022, doi: 10.1016/j.bspc.2021.103456.

T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama, “Optuna: A Next-generation Hyperparameter Optimization Framework,” in Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Association for Computing Machinery, Jul. 2019, pp. 2623–2631. doi: 10.1145/3292500.3330701.

N. A. Baghdadi, S. M. Farghaly Abdelaliem, A. Malki, I. Gad, A. Ewis, and E. Atlam, “Advanced machine learning techniques for cardiovascular disease early detection and diagnosis,” J Big Data, vol. 10, no. 1, pp. 1–29, Dec. 2023, doi: 10.1186/s40537-023-00817-1.

K. M. M. Uddin, R. Ripa, N. Yeasmin, N. Biswas, and S. K. Dey, “Machine learning-based approach to the diagnosis of cardiovascular vascular disease using a combined dataset,” Intell Based Med, vol. 7, pp. 1–15, Jan. 2023, doi: 10.1016/j.ibmed.2023.100100.

H. Khan, A. Bilal, M. A. Aslam, and H. Mustafa, “Heart Disease Detection: A Comprehensive Analysis of Machine Learning, Ensemble Learning, and Deep Learning Algorithms,” Nano Biomed Eng, vol. 16, no. 4, pp. 677–690, Dec. 2024, doi: 10.26599/nbe.2024.9290087.

C. M. Bhatt, P. Patel, T. Ghetia, and P. L. Mazzeo, “Effective Heart Disease Prediction Using Machine Learning Techniques,” Algorithms, vol. 16, no. 2, pp. 1–14, Feb. 2023, doi: 10.3390/a16020088.

D. Salama AbdElminaam, N. Mohamed, H. Wael, A. Khaled, and A. Moataz, “MLHeartDisPrediction: Heart Disease Prediction using Machine Learning,” Journal of Computing and Communication, vol. 2, no. 1, pp. 50–65, Jan. 2023, doi: 10.21608/jocc.2023.282098.

C. Liu, L. Yang, and J. Qu, “A structured data preprocessing method based on hybrid encoding,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Jan. 2021, pp. 1–9. doi: 10.1088/1742-6596/1738/1/012060.

A. P. Joshi and B. V. Patel, “Data Preprocessing: The Techniques for Preparing Clean and Quality Data for Data Analytics Process,” Oriental journal of computer science and technology, vol. 13, no. 0203, pp. 78–81, Jan. 2021, doi: 10.13005/ojcst13.0203.03.

M. M. Ahsan, M. A. P. Mahmud, P. K. Saha, K. D. Gupta, and Z. Siddique, “Effect of Data Scaling Methods on Machine Learning Algorithms and Model Performance,” Technologies (Basel), vol. 9, no. 3, pp. 1–17, Sep. 2021, doi: 10.3390/technologies9030052.

M. A. Latief, L. R. Nabila, W. Miftakhurrahman, S. Ma’rufatullah, and H. Tantyoko, “Handling Imbalance Data using Hybrid Sampling SMOTE-ENN in Lung Cancer Classification,” International Journal of Engineering and Computer Science Applications (IJECSA), vol. 3, no. 1, pp. 11–18, Feb. 2024, doi: 10.30812/ijecsa.v3i1.3758.

G. Husain et al., “SMOTE vs. SMOTEENN: A Study on the Performance of Resampling Algorithms for Addressing Class Imbalance in Regression Models,” Algorithms, vol. 18, no. 1, pp. 1–16, Jan. 2025, doi: 10.3390/a18010037.

F. P. Arifianti and A. Salam, “XGBoost and Random Forest Optimization using SMOTE to Classify Air Quality,” Advance Sustainable Science, Engineering and Technology, vol. 6, no. 1, pp. 1–8, Nov. 2024, doi: 10.26877/asset.v6i1.18136.

J. H. Joloudari, A. Marefat, M. A. Nematollahi, S. S. Oyelere, and S. Hussain, “Effective Class-Imbalance Learning Based on SMOTE and Convolutional Neural Networks,” Applied Sciences (Switzerland), vol. 13, no. 6, pp. 1–34, Mar. 2023, doi: 10.3390/app13064006.

P. Rim and E. Liu, “Optimizing the C4.5 Decision Tree Algorithm using MSD-Splitting,” IJACSA) International Journal of Advanced Computer Science and Applications, vol. 11, no. 10, pp. 41–47, 2020, doi: 10.14569/IJACSA.2020.0111006.

T. P. Handayani, W. Hasyim, and Nursetia, “Preliminary Evaluation of Gaussian Naive Bayes for Multi-Label Hate Speech and Abusive Language Detection on Indonesian Twitter,” Journal of International Multidisciplinary Research, vol. 1, no. 1, pp. 159–165, Nov. 2023, doi: 10.62504/jimr532.

X. T. Dang and T. T. Le, “KNN-SMOTE: An Innovative Resampling Technique Enhancing the Efficacy of Imbalanced Biomedical Classification,” in Machine Learning and Other Soft Computing Techniques: Biomedical and Related Applications, N. Hoang Phuong, N. T. Huyen Chau, and V. Kreinovich, Eds., Cham: Springer Nature Switzerland, 2024, pp. 111–121. doi: 10.1007/978-3-031-63929-6_11.

B. L. V. S. R. Krishna, V. Mahalakshmi, and G. K. M. Nukala, “A Stacking Model for Outlier Prediction using Learning Approaches,” International Journal of Intelligent Systems and Applications in Engineering, vol. 12, no. 2s, pp. 629–638, 2023, [Online]. Available: https://www.kaggle.com/datasets/johnsmith88/heart-

J. P. Lai, Y. L. Lin, H. C. Lin, C. Y. Shih, Y. P. Wang, and P. F. Pai, “Tree-Based Machine Learning Models with Optuna in Predicting Impedance Values for Circuit Analysis,” Micromachines (Basel), vol. 14, no. 2, Feb. 2023, doi: 10.3390/mi14020265.

H. Khan and P. Singh, “Heart Disease Analysis and Prediction Using EDA and ML Classifiers,” in ACM International Conference Proceeding Series, Association for Computing Machinery, Nov. 2023, pp. 1–6. doi: 10.1145/3647444.3647857.

Md. J. N. Nayeem, S. Rana, and Md. R. Islam, “Prediction of Heart Disease Using Machine Learning Algorithms,” European Journal of Artificial Intelligence and Machine Learning, vol. 1, no. 3, pp. 22–26, Nov. 2022, doi: 10.24018/ejai.2022.1.3.13.




DOI: https://doi.org/10.47738/jads.v7i1.1092

Refbacks

  • There are currently no refbacks.



Barcode

Journal of Applied Data Sciences

ISSN:2723-6471 (Online)
Publisher:Bright Publisher
Website:http://bright-journal.org/JADS
Email:taqwa@amikompurwokerto.ac.id (principal contact)
  support@bright-journal.org (technical issues)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0