Prediction of Cardiovascular Disease using NaïveBayes with Confusion Matrix

International Journal of Computer Science and Engineering
© 2023 by SSRG - IJCSE Journal
Volume 10 Issue 12
Year of Publication : 2023
Authors : Ramesh, R. Rathidevi, Priyanandhini

How to Cite?

Ramesh, R. Rathidevi, Priyanandhini, "Prediction of Cardiovascular Disease using NaïveBayes with Confusion Matrix," SSRG International Journal of Computer Science and Engineering , vol. 10,  no. 12, pp. 59, 2023. Crossref,


Cardiovascular disorders significantly contribute to reduced life expectancy. Factors such as obesity, elevated cholesterol levels, smoking habits, hypertension, diabetes, among others, can precipitate these conditions. Data from the World Health Organization reveal that cardiac-related afflictions, including myocardial infarctions and angina, are responsible for the annual demise of millions globally. The current system is designed to evaluate and benchmark historical patient outcomes against new diagnoses to forecast an individual's risk of developing heart disease in the future. By putting the aforementioned concept into practice, the proposed system is more accurate at predicting the likelihood that a new patient will have a heart attack. The Heart Attack Prediction System utilizes deep learning algorithms and techniques. However, there is very little precision while using all these methods in the existing systems. The proposed system's objective is to identify the people who are all suffering heart attacks by using important metrics. Deep learning algorithms and methods are applied to this system to improve performance and accuracy. The performance of a machine learning algorithm on test data can be quantified using a confusion matrix, which is commonly utilized to evaluate the accuracy of classification models. These models aim to assign a categorical class to each input sample. The matrix displays the counts of true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN) produced by the model when applied to the test dataset.
The following algorithm can be used in machine learning
1. Logistic regression
2. Naïve Bayes


Deep Learning, Confusion matrix, True negatives, False Positives.


[1] Karl-Patrik Kresoja et al., “A Cardiologist’s Guide to Machine Learning in Cardiovascular Disease Prognosis Prediction,” Basic Research in Cardiology, vol. 118, no. 10, pp. 1-12, 2023.
[CrossRef] [Google Scholar] [Publisher Link]
[2] Xin Qian et al., “A Cardiovascular Disease Prediction Model Based on Routine Physical Examination Indicators Using Machine Learning Methods: A Cohort Study,” Frontiers in Cardiovascular Medicine, vol. 9, pp. 1-11, 2022.
[CrossRef] [Google Scholar] [Publisher Link]
[3] PE Rubini et al., “MCIDS-Multi Classifier Intrusion Detection System for IoT Cyber Attack using Deep Learning Algorithm,” Third International Conference on Intelligent Communication Technologies and Virtual Mobile Networks (ICICV), Tirunelveli, India, pp. 354-360, 2021.
[CrossRef] [Google Scholar] [Publisher Link]
[4] Belal Abuhaija et al., “A Comprehensive Study of Machine Learning for Predicting Cardiovascular Disease Using Weka and SPSS Tools,” International Journal of Electrical and Computer Engineering, vol. 13, no. 2, pp. 1891–1902, 2023.
[CrossRef] [Google Scholar] [Publisher Link]
[5] Abdullah Alqahtani et al., “Cardiovascular Disease Detection using Ensemble Learning,” Computational Intelligence and Neuroscience, vol. 2022, pp. 1-9, 2022.
[CrossRef] [Google Scholar] [Publisher Link]
[6] Ahmed M. Alaa et al., “Cardiovascular Disease Risk Prediction Using Automated Machine Learning: A Prospective Study of 423,604 Uk Biobank Participants,” Plos One, vol. 14, no. 5, 2019.
[CrossRef] [Google Scholar] [Publisher Link]
[7] Ruby Hasan, “Comparative Analysis of Machine Learning Algorithms for Heart Disease Prediction,” ITM Web of Conferences, vol. 40, pp. 1-7, 2021.
[CrossRef] [Google Scholar] [Publisher Link]
[8] Archana Singh, and Rakesh Kumar, “Heart Disease Prediction Using Machine Learning Algorithms,” 2020 International Conference on Electrical and Electronics Engineering (ICE3), Gorakhpur, India, pp. 452-457, 2020.
[CrossRef] [Google Scholar] [Publisher Link]
[9] Apurv Garg, Bhartendu Sharma, and Rijwan Khan, “Heart Disease Prediction using Machine Learning Techniques,” IOP Conference Series: Materials Science and Engineering, vol. 1022, pp. 1-10, 2021.
[CrossRef] [Google Scholar] [Publisher Link]
[10] Chayakrit Krittanawong et al., “Machine Learning Prediction in Cardiovascular Diseases: A Meta-Analysis,” Scientific Reports, vol. 10, no. 16057, pp. 1-11, 2020.
[CrossRef] [Google Scholar] [Publisher Link]
[11] Agmir Javaid et al., “Medicine 2032: The Future of Cardiovascular Disease Prevention with Machine Learning and Digital Health Technology,” American Journal of Preventive Cardiology, vol. 12, 2022.
[CrossRef] [Google Scholar] [Publisher Link]
[12] M. Ramesh, and C. Vijayakumaran, “Review of Big Data Analytics and Machine Learning Models for Contract Tracking and Detecting of COVID-19 Pandemic Cases,” Proceedings - 6 th International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, pp. 825-831, 2022.
[CrossRef] [Google Scholar] [Publisher Link]
[13] M.D. Amzad Hossen et al., “Supervised Machine Learning-Based Cardiovascular Disease Analysis and Prediction,” Mathematical Problems in Engineering, vol. 2021, pp. 1-10, 2021.
[CrossRef] [Google Scholar] [Publisher Link]
[14] Karan Bhanot, “Predicting Presence of Heart Diseases using Machine Learning,” Medium, 2019.
[Google Scholar] [Publisher Link]
[15] Shadman Nashif et al., “Heart Disease Detection by Using Machine Learning Algorithms and a Real-Time Cardiovascular Health Monitoring System,” World Journal of Engineering and Technology, vol. 6, no. 4, pp. 854-873, 2018.
[CrossRef] [Google Scholar] [Publisher Link]