A hybrid machine learning and particle swarm optimization approach for heart disease classification
Shashi Kant Ranjan 1 and Mohan Kumar Patel 1
Corresponding Author : Shashi Kant Ranjan
Recieved : 24-Dec-2024; Revised : 10-Jun-2025; Accepted : 28-Jun-2025
Abstract
Heart disease remains one of the leading causes of mortality worldwide, highlighting the urgent need for accurate and efficient prediction systems. In this study, a hybrid framework combining machine learning (ML) classifiers with particle swarm optimization (PSO) was proposed for heart disease classification. Two hybrid models, random forest (RF)–PSO and decision tree (DT)–PSO, were developed using the Cleveland heart disease dataset. Data preprocessing included normalization, encoding, and feature selection to enhance model efficiency. PSO was employed to optimize hyperparameters of RF and DT classifiers. The results demonstrated that RF–PSO achieved superior performance, with an accuracy of 94%, compared to DT–PSO, which attained 89% accuracy. The findings suggest that RF–PSO provides a robust and reliable framework for early detection of heart disease, supporting healthcare professionals in timely diagnosis and intervention.
Keywords
Heart disease prediction, Machine learning, Random forest (RF), Decision tree (DT), Particle swarm optimization (PSO), Cleveland heart disease dataset.
References
[1] Sharma SK, Goel L, Mittal N. Nature-inspired optimization techniques for cardiovascular disease detection: a comprehensive survey. Neural Computing and Applications. 2025; 37(4):1839-74.
[2] MunishKhanna, Singh LK, Garg H. A novel approach for human diseases prediction using nature inspired computing & machine learning approach. Multimedia Tools and Applications. 2024; 83(6):17773-809.
[3] Ashwini A, Chirchi V, Balasubramaniam S, Shah MA. Bio inspired optimization techniques for disease detection in deep learning systems. Scientific Reports. 2025; 15(1):18202.
[4] Singh J, Kumar V, Sinduja K, Ekvitayavetchanukul P, Agnihotri AK, Imran H. Enhancing heart disease diagnosis through particle swarm optimization and ensemble deep learning models. In nature-inspired optimization algorithms for cyber-physical systems 2025 (pp. 313-30). IGI Global Scientific Publishing.
[5] Houssein EH, Mohamed GM, Djenouri Y, Wazery YM, Ibrahim IA. Nature inspired optimization algorithms for medical image segmentation: a comprehensive review. Cluster Computing. 2024; 27(10):14745-66.
[6] Isik I. Heart disease prediction with feature selection based on metaheuristic optimization algorithms and electronic filter model. Arabian Journal for Science and Engineering. 2024; 49(9):11953-66.
[7] Amiri Z, Heidari A, Zavvar M, Navimipour NJ, Esmaeilpour M. The applications of nature‐inspired algorithms in internet of things‐based healthcare service: a systematic literature review. Transactions on Emerging Telecommunications Technologies. 2024; 35(6):e4969.
[8] Alshraideh M, Alshraideh N, Alshraideh A, Alkayed Y, Al Trabsheh Y, Alshraideh B. Enhancing heart attack prediction with machine learning: A study at Jordan University Hospital. Applied Computational Intelligence and Soft Computing. 2024; 2024(1):5080332.
[9] Khan MA, Mazhar T, Mateen Yaqoob M, Badruddin Khan M, Jilani Saudagar AK, Ghadi YY, et al. Optimal feature selection for heart disease prediction using modified artificial bee colony (M-ABC) and K-nearest neighbors (KNN). Scientific Reports. 2024; 14(1):26241.
[10] Alanazi SM, Khamis GS. Optimizing machine learning classifiers for enhanced cardiovascular disease prediction. Engineering, Technology & Applied Science Research. 2024; 14(1):12911-7.
[11] Kumar A, Dhanka S, Singh J, Ali Khan A, Maini S. Hybrid machine learning techniques based on genetic algorithm for heart disease detection. Innovation and Emerging Technologies. 2024; 11:2450008.
[12] Yadav AL, Soni K, Khare S. Heart diseases prediction using machine learning. In 14th international conference on computing communication and networking technologies (ICCCNT) 2023 (pp. 1-7). IEEE.
[13] Natarajan K, Vinoth Kumar V, Mahesh TR, Abbas M, Kathamuthu N, Mohan E, et al. Efficient heart disease classification through stacked ensemble with optimized firefly feature selection. International Journal of Computational Intelligence Systems. 2024; 17(1):174.
[14] Karna VV, Karna VR, Janamala V, Devana VK, Ch VR, Tummala AB. A comprehensive review on heart disease risk prediction using machine learning and deep learning algorithms. Archives of Computational Methods in Engineering. 2025; 32(3):1763-95.
[15] Dwivedi AK, Yadav A, Gamad RS. Heart disease prediction using hybrid machine learning with ECG dataset for healthcare-IOT application. In 2025 4th OPJU international technology conference (OTCON) on smart computing for innovation and advancement in industry 5.0 2025 (pp. 1-6). IEEE.
[16] Manocha M, Kumar A, Singh VK, Singh Y. Heart disease prediction analysis with machine learning. In 3rd international conference on disruptive technologies (ICDT) 2025 (pp. 1378-82). IEEE.
[17] Rabbi MA, Rijon RH, Akhi SS, Hossain A, Jeba SM. A detailed analysis of machine learning algorithm performance in heart disease prediction. In 4th international conference on robotics, electrical and signal processing techniques (ICREST) 2025 (pp. 259-63). IEEE.
[18] Golchha B, Patil H, Girirajan S, Sandhia GK, Karthikeyan M. Enhanced machine learning model for heart disease prediction. In Global conference in emerging technology (GINOTECH) 2025 (pp. 1-5). IEEE.
[19] Susmitha R. Predictive modelling for heart disease: evaluating machine learning techniques. In 6th international conference on intelligent communication technologies and virtual mobile networks (ICICV) 2025 (pp. 780-5). IEEE.
[20] Isabella S, Manikandan G, Vijay Sai R, Karthikeyan B. Optimized machine learning model using binary grasshopper algorithm for heart disease diagnosis. In 5th international conference on pervasive computing and social networking (ICPCSN) 2025 (pp. 665-70). IEEE.
[21] Aditya R, Nivetha G, Ram Venkatesh K, Dilli Kumaran V. A predictive analytics in cardiology: evaluating machine learning algorithms. In international conference on computing and communication technologies (ICCCT) 2025 (pp. 1-6). IEEE.