Machine Learning Based Chronic Disease Heart Attack Prediction
Machine Learning Based Chronic Disease Heart Attack Prediction
Abstract— A heart attack is a life-threatening event that heart attack yearly, and approximately 30% of these
can be extremely difficult to predict. Early detection and incidents are recurrent events. These statistics highlight the
prompt treatment can significantly reduce mortality rates. critical need for accurate and timely identification of
According to the British Health Foundation (B.H.F.), 1 in individuals at risk of heart disease and heart attacks. The
14 people live globally with a heart or circulatory disease. development of machine learning-based predictive
Moreover, around 200 million people are estimated to live models for heart attack prediction can improve the
with coronary heart disease. Over the past decades, machine accuracy of risk assessment and enable timely preventive
learning (ML) techniques have been applied to measures, leading to better health outcomes and reduced
cardiovascular data to identify patterns and predict healthcare costs.
outcomes. In particular, ML algorithms have been used to
predict the risk of a heart attack. This paper aims to use II. LIT ERAT URE REVIEW
machine learning to predict the risk of a patient having a [1] The study highlights the potential of machine
heart attack. Data with various features such as age, gender, learning models in predicting heart attack risk based on
and cholesterol have been used to create a predictive model.
non-invasive physiological and demographic factors.
The model was trained and tested on various datasets to
[2]The study highlights the potential of machine learning
determine its accuracy and ability to predict the risk of a
models in predicting heart attack risk based on E.C.G.
heart attack. The findings of this study can be used to
develop more accurate methods for predicting the risk of a results and other medical history factors. [3]The study
heart attack and reduce the number of deaths caused by highlights the potential of machine learning models in
heart attacks. predicting heart attack risk based on demographic and
clinical factors. [4]The authors discuss the strengths and
Keywords— Heart attack, machine learning, prediction, limitations of different approaches and highlight the need
algorithm, chronic disease for more standardized data collection and feature selection
methods. [5] The authors discuss the challenges associated
with heart failure prediction and the potential of machine
learning models in improving the accuracy of risk
I. INT RODUCT ION
assessment. [6] The authors discuss the potential of
Heart disease is a significant global health concern that machine learning models in complementing traditional
remains as a leading cause of mortality. Early detection epidemiological methods for heart disease prediction. [7]
and accurate prediction of the risk of heart attacks can play The authors highlight the potential of machine learning
a crucial role in implementing preventive measures and algorithms to increase the precision of cardiac disease
reducing the associated health risks. Machine learning prediction. [8] The authors address the potential of
(ML) has emerged as a promising approach for developing machine learning models in enhancing the accuracy of
predictive models for various medical conditions, heart failure prediction. [9] The authors emphasize how
including heart disease. Over the years, researchers have machine learning models could increase accuracy and
explored the potential of ML algorithms in predicting the efficiency of heart disease diagnosis. [10] The authors
risk of heart attacks based on various physiological and review various models and provide an overview of their
demographic factors. This research paper aims to review accuracy and limitations. They also discuss the
heart attack prediction using machine learning techniques. importance of feature selection and data standardization.
Specifically, this study will discuss the features used in [11] The authors compare the accuracy of various
these models, the different algorithms employed, and the algorithms and discuss the importance of feature selection
performance metrics used to evaluate the effectiveness of and data preprocessing. [12] The authors discuss the
these models. Ultimately, this paper aims to provide potential of machine learning models in improving the
insights into the potential of ML-based heart attack accuracy of risk assessment and disease prediction. [13]
prediction, highlighting the challenges and opportunities The authors review several models' accuracy, discuss the
for further research in this area. value of feature selection, and optimize the model. [14]
Heart disease is a leading cause of death worldwide, The authors present an overview of various techniques
responsible for an estimated 17.9 million deaths annually, and discuss the significance of feature selection and
according to the World Health Organization (WHO). In the model optimization. [15] The authors compare the
United States alone, more than 600,000 people die yearly accuracy of various models and discuss the importance of
due to heart disease, accounting for one in every four
deaths. In addition, about 735,000 Americans experience a
feature selection and data standardization. [16] The authors b) Model Training: Several machine learning
discuss the importance of feature selection and provide an models will be trained using the preprocessed dataset,
overview of the accuracy of various models. [17] The including logistic regression, random forest, and neural
authors compare the accuracy of various models and networks. The hyperparameters of the models will be
discuss the importance of feature selection and data optimized using cross-validation and grid search
standardization. [18] Predictive modeling for heart disease techniques.
using machine learning techniques file.
c) Model evaluation: The trained models will be
evaluated using appropriate model evaluation metrics such
III. A IMS AND OBJECT IVES as accuracy, precision, recall, and F1-score. The models
will be compared to identify the most accurate and reliable
A. Aims model.
To develop a machine learning model for
heart attack prediction that can accurately C. Algorithms
predict patients' risk of a heart attack.
To compare the performance of different machine a) Logistic Regression: Logistic Regression is a
learning algorithms for heart attack prediction and machine-learning model for predicting heart attacks. It is a
identify the most accurate and reliable model. binary classification model that uses a sigmoid function to
output a probability between 0 and 1, which indicates the
To identify the most important risk factors likelihood of a patient having a heart attack. The formula
associated with heart attack and develop a
for logistic regression is:
predictive model incorporating these unavoidable
factors.
Y = 1/(1+e^(-(b0+b1X1+b2X2+ ⋯.+bnXn)) )
h) GradientBoost: Gradient Boosting is a machine In this study, we aimed to develop a heart attack
learning ensemble method that combines multiple weak prediction model using machine learning techniques. Our
learners to obtain a strong learner. It is a boosting technique dataset included information from 303 patients, each with
that sequentially trains models by minimizing the loss 14 different features, such as age, gender, blood pressure,
function using gradient descent, aiming to improve the and cholesterol levels. We split the dataset into a training
algorithm's overall performance. set (80%) and a testing set (20%) to evaluate the
performance of our model.
Decision Trees Classifier experimented with various 80-20 12-6-3-1 200 64.91
train-test split ratios (Table II.) of which 80 – 20 gave the
best result. 80-20 12-6-3-1 300 66.67
Algorithm Accuracy
The development of accurate heart attack prediction
Logistic regression 0.912 models has significant implications for patient care. By
KNN 0.679 identifying high-risk individuals, doctors can implement
SVM 0.841 preventative measures, such as lifestyle changes or
Decision tree 0.824 medication, to reduce the likelihood of a heart attack
Random forest 0.825 occurring. This can lead to better health outcomes for
Bagging 0.842 patients and lower healthcare costs.
AdaBoost 0.824
GradientBoost 0.807 Furthermore, the development of accurate heart attack
XGBoost 0.812 prediction models has the potential to revolutionize the
Neural Network 0.859 healthcare industry. With more accurate and personalized
risk assessments, doctors can develop targeted treatment
All the algorithms were checked with multiple plans and improve patient outcomes. This can lead to a
parameters, the train-test split ratios, but a comparison 80:20 shift in the focus of healthcare from reactive to
train-test ratio was considered for all the models as it yielded preventative, which has significant implications for patient
the best accuracy in most cases. As seen from Table X., the care and healthcare costs.
logistic regression model gave the highest accuracy on
comparison and hence was further utilized to predict whether V II I. CONCLUSION
a person has a chance of having a heart attack or not. The Furthermore, heart attack prediction research is an
following array was given as input: essential area of study that has significant implications for
patient care and the healthcare industry. By developing
(41,0,1,130,204,0,0,172,0,1.4,2,0,2) accurate prediction models, researchers can identify high-
which resulted in the output that the person has a chance of risk individuals and implement preventative measures to
being prone to a heart attack. reduce the likelihood of heart attacks occurring. This has
the potential to improve patient outcomes and lower
healthcare costs while shifting healthcare focus from
V I. RESULT S
reactive to preventative notes.
The data were analyzed using different machine
learning algorithms ranging from logistic regression to I X. FUT URE SCOPE
Boosting, and the models were evaluated based on their The future scope for heart attack prediction research is
accuracy values which were noted. Table X. shows the broad and promising, potentially significantly improving
accuracy values for the respective algorithms. Apart from
public health by providing earlier identification and
this, the best model was also evaluated on another metric,
i.e., Recall, and the value was noted from the confusion intervention for those at risk for heart attacks. Here are
matrix (Fig 3.). some possible directions for future research:
Personalizing risk prediction: Risk factors for heart
The observed recall value was 93.33% attack can vary widely among individuals, and personalized
risk prediction can improve accuracy. Future research can
focus on identifying individual risk factors and developing
models that can accurately predict each person's heart attack
risk.
[6] Mahmood, S. S., Levy, D., Vasan, R. S., & Wang, T . J. (2018).
Studying the impact of lifestyle interventions such as T he Framingham Heart Study and the epidemiology of
cardiovascular disease: a historical perspective. T he Lancet,
diet and exercise can have a significant impact on the risk 391(10173), 2317-2327.
of a heart attack. Future research can focus on studying the
impact of lifestyle interventions on heart attack risk and [7] Mueen, A., & Mohiuddin, A. K. (2020). Prediction of heart
developing personalized lifestyle interventions for disease using machine learning algorithms: a review. Journal of
Medical Systems, 44(6), 111.
individuals at risk.
[8] Rahimi, K., Bennett, D., Conrad, N., Williams, T . M., Basu, J.,
Dwight, J., ... & Prospective Studies Collaboration. (2014). Risk
X . LIMIT ATIONS OF ST UDY prediction in patients with heart failure: a systematic review and
analysis. J.A.C.C.: Heart Failure, 2(5), 440-446.
The study is limited in its scope as it has a limited
number of rows and columns. The presence of dynamic [9] Zhang, Y., Chen, L., Dai, J., Xu, Z., & Xu, X. (2020). Machine
learning for heart disease diagnosis: a systematic review. Frontiers
data instead of static data could prove to be more useful and in Cardiovascular Medicine, 7, 35.
relevant.
[10] Rathore, S., Gupta, V., Kumar, M., & Kumar, M. (2020). Heart
X I. AUTHOR’S CONT RIBUT ION attack prediction using machine learning algorithms: a systematic
review. Journal of Healthcare Engineering, 2020, 1-15.
All the authors contributed equally throughout the
paper. [11] Anwar, A., & Majid, M. (2021). An analysis of machine learning
models for heart attack prediction. International Journal of
Engineering and T echnology, 13(2), 119-126.