Professional Documents
Culture Documents
Abstract
According to recent reports, the leading cause of death is heart disease, especially heart
attacks, which has surpassed cancer as the world's leading cause of death. Heart illnesses are
one of the most lethal, but silent killers of humans, resulting in an annual increase in the
death rate of patients. Machine Learning is playing a major role in predicting the
presence/absence of locomotor disorders, Lung diseases, brain tumors, heart diseases and so
on. This helps in early diagnosis and treatment of patient. In proposed work, various machine
learning algorithms i.e., KNN, Naïve Bayes classifier are applied for cardiac attack prediction
and analyze their performance. This work intends for designing a user-friendly Graphical
User Interface (GUI) which predicts the cardiac attacks based on the patient record data with
14 attributes like Blood Pressure(bp), age, slope, exang etc. The attributes are recorded as
patient input and a health condition of patients is predicted as safe or risky. The system also
gives recommendations of expert doctors for further consultations.
I.INTRODUCTION
Heart illnesses are one of the most lethal, but silent killers of humans, resulting in an annual
increase in the death rate of patients. In 2020, the World Health Organization (WHO) claimed
that heart disease is responsible for 17.9 million deaths globally each year. In the healthcare
industry, massive amounts of data are created on a daily basis, containing many sorts of data,
and gaining information from these data is critical. This knowledge may be obtained by
creating models from the medical records dataset using various data mining approaches.
Machine Learning (ML) known in the corporate world for its valuable use in controlling,
contrasting and managing large datasets can be applied with much success to the prediction
of cardiovascular diseases. The doctors cannot go through every minute detail of the data and
predict accurately each and every time. It is time consuming and risky. This project intends
for designing a user-friendly Graphical User Interface (GUI) with machine learning models
running in the background, which predicts the cardiac attacks based on the patient record data
consisting 14 attributes. This GUI takes patient’s data as attributes which is input to the
system and gives the output showing whether the health condition of patient will be safe or
risky predicted by various classifiers.
II.LITERATURE REVIEW
In this modern era, we cannot deny the existence of data and its importance anywhere.
Whether you are a buyer or seller, company or customer, doctor or patient there is a lot of
data involved, everywhere all the significant stories live in your data which if arranged and
• Historical data: In this study, a dataset from Kaggle website is taken for creating
model with maximum possible accuracy. It includes an actual dataset of 1026 data
samples with 14 different features (13 predictors; 1 target), such as blood pressure,
kind of chest discomfort, ECG result, and so on.
• Data Pre-processing: Preparing the raw data for a machine learning model. We
have to evaluate the raw data and check whether the data is overfitted or not. Cross
validation method is used in proposed work for this stage.
• Attribute Selection: Select a subset of relevant features like variables, predictors
which are used to construct a model --- like, BP, age, exang, slope etc...
• Training Data: Train the model with different algorithms using 75% training data.
• Testing Data: Test the model with 25% of the test data and compare the values.
• Evaluate Prediction: Evaluate the predicted value with actual value using
performance metrics like accuracy score, classification report and confusion
matrix.
• Hard voting — If we receive the output of each weak learner in classes (for e.g: 0/1),
and finally we select the output class which was returned in majority, then this
method is called hard voting.
• Soft voting — There are many algorithms which also provide us with prediction
probabilities and if we receive the output in probabilities, we take the average of the
probabilities of each of the classes and whichever class is having the highest average
will be the final prediction. This way of prediction is called Soft voting and is better
than hard voting as we receive more information in terms of probability.
3.1.5 BOOSTING: XGBoost
The main idea behind boosting is to convert weak learners to strong learners in sequential
iterations. XGBClassifier is a classification class that works with the scikit-learn API.
3.2. UML Diagrams
UML diagrams define the system's boundary, configuration, and action, as well as the
objects inside it. UML Diagrams for our application are as follows:
3.2.1 Use Case Diagram
A use case is a description of how a user who actually uses that process or system will
accomplish a goal. The admin will manage the dataset and train the model. Here the Doctor is
a regular user who uses the GUI to interact with system to obtain results. Admin is the one
who will login, manage dataset and also train dataset for a best model when used gives
accurate predicted values. The doctor is the one who uses this interface to interact with model
and treats patients based on the predicted values obtained by given input attribute values.
When attributes are entered and requested to predict, the pickle loaded in “app.py” is
executed and the results are finally displayed.
Fig. 8. (a) Output Interface for Patient with Heart disease risk
The proposed system can be used to reduce risk and to prevent heart attack or sudden
cardiac death. Using various machine learning algorithms, we have become successful in
forecasting the health condition of the user. We have created a GUI where patient can
enter 14 attributes of his health and know his health condition. As prevention is better
than cure, this project focuses on prevention of the cardiac emergencies which helps in
saving many lives.
This model can be developed and used in smart watches for predicting heart attack and
indicating an alarm in advance to prevent emergencies. Also hospitals can create their
own app or website by including this model for better treatment of heart attacks. These
developments reduce deaths due to heart attacks to maximum rate.
References
[1] Takci H. Improvement of heart attack prediction by the feature selection methods.
Turkish Journal of Electrical Engineering & Computer Sciences. 2018 Jan
27;26(1):1-0.
[2] Patil SB, Kumaraswamy YS. Extraction of significant patterns from heart disease
warehouses for heart attack prediction. IJCSNS. 2009 Feb 28;9(2):228-35.
[3] Alexander CA, Wang L. Big data analytics in heart attack prediction. J
Nurs Care. 2017 Apr;6(393):2167-1168.
[4] Rajkumar, A. and Reena, G.S., 2010. Diagnosis of heart disease using datamining
algorithm.Global journal of computer science and technology, 10(10), pp.38-43.
[5] C. Thirumalai, A. Duba and R. Reddy, "Decision making system using machine
learning and Pearson for heart attack," 2017 International conference of
Electronics, Communication and Aerospace Technology (ICECA), 2017, pp. 206-
210.
[6] K. Srinivas, G. R. Rao and A. Govardhan, "Analysis of coronary heart disease and
prediction of heart attack in coal mining regions using data mining techniques,"
2010 5th International Conference on Computer Science & Education, 2010, pp.
1344-1349.
[7] T. Obasi and M. OmairShafiq, "Towards comparing and using Machine Learning
techniques for detecting and predicting Heart Attack and Diseases," 2019 IEEE
International Conference on Big Data (Big Data), 2019, pp. 2393-2402.
[8] Jabbar MA, Chandra P, Deekshatulu BL. Cluster based association rule mining
for heart attack prediction. Journal of Theoretical and Applied Information
Technology. 2011 Oct 31;32(2):196-201.
[9] Soni J, Ansari U, Sharma D, Soni S. Predictive data mining for medical diagnosis:
An overview of heart disease prediction. International Journal of Computer
Applications. 2011 Mar 8;17(8):43-8.
[10] Kwon, Jm., Kim, KH.,Jeon, KH. et al. Artificial intelligence algorithm for
predicting cardiac arrest using electrocardiography. Scand J Trauma ResuscEmerg
Med 28, 98 (2020).