Hyperparameter Tuning of Support Vector Machine Using Grid Search for Heart Disease Prediction

Authors

  • Reza Mardiansyah Putra Institut Pendidikan dan Teknologi ‘Aisyiyah Riau
  • Annisa Rahmadani Institut Pendidikan Dan Teknologi ‘Aisyiyah Riau
  • Aditya Warman Institut Pendidikan Dan Teknologi ‘Aisyiyah Riau

DOI:

https://doi.org/10.29103/sisfo.v10i2.27556

Keywords:

Grid Search, Hyperparameter Tuning, Nested Cross-Validation, SVM

Abstract

Hyperparameter tuning plays a crucial role in determining the accuracy and reliability of machine learning models for medical diagnosis, particularly in the identification of critical diseases such as heart disease, which involve complex clinical data characteristics. However, standard machine learning models such as Support Vector Machine (SVM) often suffer from classification bias when hyperparameters are not properly configured. To address this limitation, this study aims to improve heart disease prediction performance through SVM optimization using the Grid Search method. The experiments were conducted using the Cleveland heart disease dataset obtained from the UCI Machine Learning Repository, consisting of 303 patient records and 13 predictive features. The target variable was transformed into a binary classification problem (healthy versus diseased). To prevent data leakage, preprocessing procedures—including missing value imputation and feature normalization—were strictly integrated within a closed machine learning pipeline. The performance of the optimized SVM model was then compared with a baseline SVM model using an independent hold-out test set and a nested cross-validation framework evaluated through ROC-AUC metrics. The experimental results demonstrate that systematic hyperparameter optimization significantly improves predictive performance. The findings indicate that the combination of Grid Search and a rigorous validation strategy produce a robust heart disease prediction model with strong generalization capability when applied to unseen clinical data.

References

[1] G. Alwakid, F. Ul Haq, N. Tariq, M. Humayun, M. Shaheen, and M. Alsadun, “Optimized machine learning framework for cardiovascular disease diagnosis: a novel ethical perspective,” BMC Cardiovasc. Disord., vol. 25, no. 1, Dec. 2025, doi: 10.1186/s12872-025-04550-w.

[2] J. P. Barrios and G. H. Tison, “Advancing cardiovascular medicine with machine learning: Progress, potential, and perspective,” Dec. 20, 2022, Cell Press. doi: 10.1016/j.xcrm.2022.100869.

[3] H. Elwahsh, E. El-shafeiy, S. Alanazi, and M. A. Tawfeek, “A new smart healthcare framework for real-time heart disease detection based on deep and machine learning,” PeerJ Comput. Sci., vol. 7, pp. 1–34, 2021, doi: 10.7717/PEERJ-CS.646.

[4] A. T L, A. BK, and D. D, “Heart Disease Prediction Using Logistic Regression,” Indian Journal of Computer Science and Technology, pp. 356–359, Aug. 2025, doi: 10.59256/indjcst.20250402048.

[5] B. Ahmad, | Jinfu Chen, and H. Chen, “Feature selection strategies for optimized heart disease diagnosis using ML and DL models,” Mar. 2025.

[6] M. Hajiarbabi, “Heart disease detection using machine learning methods: a comprehensive narrative review,” Jun. 30, 2024, AME Publishing Company. doi: 10.21037/jmai-23-152.

[7] A. A. Lamir, S. Razzagzadeh, and Z. Rezaei, “A Comprehensive Machine Learning Framework for Heart Disease Prediction: Performance Evaluation and Future Perspectives,” May 2025.

[8] M. S. Pathan, A. Nag, M. M. Pathan, and S. Dev, “Analyzing the impact of feature selection on the accuracy of heart disease prediction,” Healthcare Analytics, vol. 2, Nov. 2022, doi: 10.1016/j.health.2022.100060.

[9] M. A. Bouqentar et al., “Early heart disease prediction using feature engineering and machine learning algorithms,” Heliyon, vol. 10, no. 19, Oct. 2024, doi: 10.1016/j.heliyon.2024.e38731.

[10] A. Pahlevani, A. Kashefi, E. Arslan, B. Kumeda Kussia, and J. Hassannataj Joloudari, “Predicting coronary artery disease with ensemble-based feature selection and grid search-tuned SVM under class imbalance conditions,” Discover Data, vol. 3, no. 1, Nov. 2025, doi: 10.1007/s44248-025-00088-6.

[11] B. Duraisamy, R. Sunku, K. Selvaraj, V. V. R. Pilla, and M. Sanikala, “Heart disease prediction using support vector machine,” in Multidisciplinary Science Journal, Malque Publishing, 2024. doi: 10.31893/multiscience.2024ss0104.

[12] M. A. Khan et al., “Optimal feature selection for heart disease prediction using modified Artificial Bee colony (M-ABC) and K-nearest neighbors (KNN),” Sci. Rep., vol. 14, no. 1, Dec. 2024, doi: 10.1038/s41598-024-78021-1.

[13] S. Kordnoori, H. Mostafaei, M. Rostamy-Malkhalifeh, and M. Ostadrahimi, “Diagnosis of Heart Disease Using Feature Selection Methods Based On Recurrent Fuzzy Neural Networks,” IPTEK The Journal for Technology and Science, vol. 32, no. 2, p. 64, Sep. 2021, doi: 10.12962/j20882033.v32i2.7075.

[14] N. R. Kolukula, P. N. Pothineni, V. M. K. Chinta, V. G. Boppana, R. P. Kalapala, and S. Duvvi, “Predictive analytics of heart disease presence with feature importance based on machine learning algorithms,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 32, no. 2, pp. 1070–1077, Nov. 2023, doi: 10.11591/ijeecs.v32.i2.pp1070-1077.

[15] M. Jordan, J. Kleinberg, and B. Schölkopf, “Pattern Recognition and Machine Learning,” 2016.

[16] C. H. Cheng, B. J. Lee, O. N. Nfor, C. H. Hsiao, Y. C. Huang, and Y. P. Liaw, “Using machine learning-based algorithms to construct cardiovascular risk prediction models for Taiwanese adults based on traditional and novel risk factors,” BMC Med. Inform. Decis. Mak., vol. 24, no. 1, Dec. 2024, doi: 10.1186/s12911-024-02603-2.

[17] J. Abdollahi and B. Nouri-Moghaddam, “A hybrid method for heart disease diagnosis utilizing feature selection based ensemble classifier model generation,” Iran Journal of Computer Science, vol. 5, no. 3, pp. 229–246, Sep. 2022, doi: 10.1007/s42044-022-00104-x.

[18] D. B. Olawade, A. A. Soladoye, B. A. Omodunbi, N. Aderinto, and I. A. Adeyanju, “Comparative analysis of machine learning models for coronary artery disease prediction with optimized feature selection,” Int. J. Cardiol., vol. 436, Oct. 2025, doi: 10.1016/j.ijcard.2025.133443.

[19] T. Hastie, R. Tibshirani, and J. Friedman, “Springer Series in Statistics The Elements of Statistical Learning Data Mining, Inference, and Prediction,” 2009.

[20] A. Z. Baratpur, H. Vahdat-Nejad, E. Arslan, J. Hassannataj Joloudari, and S. Gaftandzhieva, “Coronary artery disease prediction using Bayesian-optimized support vector machine with feature selection,” Frontiers in Network Physiology, vol. 5, 2025, doi: 10.3389/fnetp.2025.1658470.

[21] Sebastian. Raschka and Vahid. Mirjalili, Python machine learning : machine learning and deep learning with python, scikit-learn, and tensorflow 2. Packt Publishing, Limited, 2019.

[22] G. Onorato, “Bayesian Optimization for Hyperparameters Tuning in Neural Networks,” Oct. 2024, [Online]. Available: http://arxiv.org/abs/2410.21886

[23] B. Van Calster et al., “Evaluation of performance measures in predictive artificial intelligence models to support medical decisions: overview and guidance,” Dec. 01, 2025. doi: 10.1016/j.landig.2025.100916.

Downloads

Published

2026-06-23