Content uploaded by Yamala Sandhya
Author content
All content in this area was uploaded by Yamala Sandhya on Mar 23, 2020
Content may be subject to copyright.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
126
©IJRASET: All Rights are Reserved
Prediction of Heart Diseases using Support Vector
Machine
Yamala Sandhya
Research scholar in Computer Science Engineering, Sreenidhi Institute of Science and Technology, Hyderabad (T.G), India
Abstract: Heart disease is the normal term used in the health industry. The meaning of the Heart disease is that the heart is not
working properly or normally. In the medical terminology the heart attack is a condition where the supply of the blood to the
organs of the body is blocked and then it will result into the blood clot. Now-a-days there are so many heart diseases like
Coronary Artery Disease, Congestive Heart Failure and Bad Heart Rhythms etc. There are so many number of people who are
suffering from the heart diseases. The heart diseases may or may not have the symptoms before it attack the people. So we need
to predict the heart diseases for the people it effect or not. Now-a-days so much number of people is died suddenly due to the
heart attack because the life style of the people is changed rapidly. In this research paper we use the Support Vector Machine
which is the Machine Learning algorithm. The support vector machine is a supervised learning method. In the research paper
the Support Vector Machine can predict the heart disease based on the given factors like sex, age, pulse rate etc. The machine
learning algorithm support vector machine used in this research paper will give the most accurate and reliable results when
compare to the other algorithms.
Keywords: Support Vector Machine, Machine learning, Heart diseases, Prediction, Symptoms.
I. INTRODUCTION
Now-a-days death of the people is increased due to the heart diseases. Heart Attack is the main reason for the death of the people.
There are so many diseases occur in the heart. There are so many reasons and factors which involve in the occurring of the heart
diseases. The death of the male is more than the female due to the heart diseases because of the smoking and drinking habit of the
male. The human life is mostly depending on the working functionality of the heart because heart supply the blood to the all the
organs of the body.
Heart diseases consist the High blood pressure, Heart attack, Heart value disease and Heart failure etc. In case of the heart diseases it
is important to predict the diseases in the early stages and take the treatment in early.
Fig 1: Heart diseases.
In this research paper we use the one of the Machine learning algorithm to predict the heart diseases in early stages based on the
factors like age, sex and blood pressure etc. The Support vector machine algorithm is provide the better accuracy and results when
compare to the other algorithms.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
127
©IJRASET: All Rights are Reserved
II. BACKGROUND WORK
There are two types of heart disease factors for risk. They are
1) Controllable factors.
2) Uncontrollable factors.
The Controllable factors are smoking, drinking, weight, blood pressure and cholesterol these can be controlled by the humans to
reduce the heart diseases.
The Uncontrollable factors are sex, age, history of the family. These cannot be controlled by the humans to reduce the heart diseases.
There are so many types of the heart diseases are present in the world. Some of the heart diseases are listed below.
Fig 2: Types of Heart diseases.
A. Congenital heart disease
The Congenital heart disease is type of heart disease that has been occurring in the heart since birth of people. Some of the examples
of congenital heart disease are:
1) Septal Defects: The septal defects have the hole between the two chambers of the heart of people.
2) Obstruction Defects: In the obstruction defects there is partial or total block of the flow of blood among the chambers of the
heart.
3) Cyanotic Heart Disease: The cyanotic heart disease has the shortage or less amount of the oxygen around the human body.
Fig 3: Congenial Heart disease.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
128
©IJRASET: All Rights are Reserved
B. Arrhythmia
Arrhythmia is occurring due to the changes in the normal heartbeat of the people.
Fig 4: Arrhythmia.
There are so many reasons for occurring of the Arrhythmia to the people. They are:
1) Tachycardia: The tachycardia occurs due to the fast heartbeat rate.
2) Bradycardia: The Bradycardia occurs due to the slow heartbeat rate.
When the electrical impulses in the human body heart fail to coordinate the heartbeat rate of the heart then the arrhythmia is
occurred. The electrical impulses make the heart to maintain the heartbeat rate as constant in any condition. Changes in the heartbeat
rate are so common, and most of the people experience it.
C. Coronary Artery Disease
The main function of the coronary arteries is to supply of the nutrients to the muscle of the heart he heart and to circulation of the
blood through oxygen. The Coronary arteries can be damaged or diseased because of the cholesterol. The cholesterol causes the
coronary arteries to supply the fewer amounts of oxygen and nutrients to the body.
Fig 5: Coronary artery disease.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
129
©IJRASET: All Rights are Reserved
D. Heart failure
Fig 6: Heart failure.
The Heart failure is also known as the congestive heart failure, the main reason for heart failure is there is no proper circulation of
blood throughout the human body efficiently and effectively.
E. Heart Muscle Disease (Cardiomyopathy)
The Heart Muscle disease is also known as the Cardiomyopathy. The Heart muscle disease occurs due to when the walls of the
human heart are become thicker or enlargement of the heart. This disease is the main reason to less supply of the blood to the whole
human body and thus results into the failure of the heart.
Fig 7: Heart muscle disease.
F. Heart Valve Disease
Fig 8: Heart valve disease.
There are four valves for the Human heart. These four valves are responsible to pumping of the blood to the whole human body and
to provide that the heart keeps the forward flow of the blood in human heart.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
130
©IJRASET: All Rights are Reserved
III. PROPOSED WORK
Machine Learning: Machine learning most used technology in now-a-days. The machine learning is an approach to train the
machine to learn from the past experience or previous examples. There are three types of machine learning algorithms. They are:
1) Supervised Learning: In supervised learning the machine is learned from the data which have labels and tag values. By using
labeled data we can easily predict the newly entered data. The supervised learning algorithm is similar to the students which are
learning under supervision of teachers.
2) Unsupervised Learning: In unsupervised learning the machine is learned from the data which does not contain any labels or tag
values. In unsupervised learning we classify or group the data by observing the similarity or relationship between the other data.
3) Reinforcement Learning: The reinforcement learning algorithm is a one type of algorithm in which the machine is interacting
with its environment by performing some actions and analyzes the data.
4) Support Vector Machine: Support vector machine is the one of the machine learning algorithms. The support vector machine is
a supervised learning algorithm. The support vector machine is used to classify the given data. The algorithm uses a hyper plane
to differentiate the different classes. Support vector machine is also used for the regression analysis. SVM classify the both
linear and non-linear data.
The main aim of the SVM classifier is to find the hyper plane in an n-dimensional space.
Fig 9: SVM classifier.
In SVM classifier the main aim to determine the plane with the maximum margin between the two data classes.
Fig 10: hyper plane in 2D and 3D.
In this research paper we use the SVM to predict the heart diseases of people. The steps involved in the prediction of heart diseases
are:
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
131
©IJRASET: All Rights are Reserved
5) Data Set: For this research process to predict the heart diseases of people we take the attributes like sex, age, blood pressure,
chest pain, sugar levels of the people.
Table 1: Data set for heart disease prediction.
In the above dataset in Gender 1 indicates the “male” and 0 indicates the “female”. In Chest pain 1 indicates “typical angina”, 2
indicates “atypical angina”, 3 indicates “non- angina pain” and 4 indicates “asymptomatic”. In prediction value 0 means “No” and 1
means “yes”.
Data preprocessing: After collecting the dataset we need to preprocess the data. The data preprocessing is used to reduce the size of
the data, remove the noisy data, eliminate the data outliers, determine the relationships among the data, and perform the
normalization on data. From the data preprocessing step we can extract the data which is needed to prediction process.
Fig 11: Process of heart disease prediction.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
132
©IJRASET: All Rights are Reserved
The prediction process also be shown in a flow chat.
Fig 12: Flow Chart of heart disease prediction.
Now we have to predict the patient’s health condition. For this process we use The R tool to predict whether the patient has heart
disease or not. In this research paper we use the R tool to predict the heart diseases of the patients. The R is software used in the
machine learning to classify the data. We have to supply the data to R tool. Then our data will become as shown below.
Fig 13: Structure of Data set – Support Vector Machine in R
Then the our next step is to train and testing of the our data. In this research paper we use 70% of data for training process and 30%
data for testing process. The summary of the data is shown below.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
133
©IJRASET: All Rights are Reserved
IV. RESULT ANALYSIS
There are so many machine learning algorithms to check whether has heart disease or not for the people. In this research paper we
use the Support Vector Machine algorithm to predict the heart diseases of people. We take the SVM algorithm for the prediction
process because it will give the greater accuracy when compare to the other machine learning algorithms. The accuracy of the
algorithm is shown in graphical representation. The results of the given data are shown below in graphical format
Fig 14: Accuracy of SVM algorithm.
The SVM algorithm gives the better precision, recall values for the given data. The below table shows the precision, recall for the
both yes and no classes.
Table 2: Precision and Recall.
The graph representation of these precision, recall values are shown below.
Fig 15: Graph of the precision and recall.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
134
©IJRASET: All Rights are Reserved
Table 3: Comparison of various machine learning algorithms for prediction of heart disease.
Fig 16: Graphical representation of the performance evaluation.
Table 4: TP and FP rate of various algorithms.
Fig 17: Graphical representation of TP and FP rate of various machine learning algorithms to predict heart diseases.
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.177
Volume 8 Issue II Feb 2020- Available at www.ijraset.com
135
©IJRASET: All Rights are Reserved
V. CONCLUSION AND FUTURE WORK
There are so many machine learning techniques to detection and prediction of the heart diseases. In this paper we use the support
vector machine to predict and identify the heart diseases of patients. We compare the result of the support vector machine algorithm
with the other machine algorithms. The SVM algorithm gives the better accuracy, specificity and sensitivity when compare to the
other machine learning algorithms.
In the future the performance of the support vector machine can be improved by using the combination of the other methods and
pruning of the given data. We can use the other machine learning techniques to get the better accuracy.
REFERENCES
[1] M.Durairaj, K.Meena, A Hybrid Prediction System Using Rough Sets and Artificial Neural Networks‖, International Journal Of Innovative Technology &
Creative Engineering (ISSN: 2045-8711) VOL.1 NO.7 JULY 2011.
[2] K. Srinivas, B. Kavitha Rani and Dr. A. Govrdhan, Applications of Data Mining Techniques in Healthcare and Prediction of Heart Attacks‖ International
Journal on Computer Science and Engineering (2010).
[3] Kala John Kappiarukudil and ManeeshaVinodini Ramesh “Real-Time Monitoring and Detection of „„Heart Attack‟‟ Using Wireless Sensor Networks”, 2010
Fourth International Conference on Sensor Technologies and Applications ISSN:978-0-7695-40962/10IEEE,2010.
[4] Mai Shouman, Tim Turner, and Rob Stocker “Using Data Mining Technique in Heart Disease Diagnosis and Treatment”, 2012 JapanEgypt Conference on
Electronics, Communications and Computers ISSN:978-1-4673-0484-9/ IEEE,pp.173-177,2012. 3
[5] Vikas Chaurasia and Saurabh Pal “Data Mining Approach to Detect Heart Dieses”, International Journal of Advanced Computer Science and Information
Technology (IJACSIT) Vol. 2, No. 4, 2013, Page: 56-66, ISSN: 2296-1739.
[6] J Peter and K. Somasundaram, “An Empirical Study on Prediction of Heart Disease Using Classification DataMining Techniques”, Proceedings of IEEE
International Conference on Advances In Engineering, Science And Management (ICAESM), (2012), pp. 514-518.
[7] Machine learning based decision support systems (DSS) for heart disease diagnosis: a review. Online: 25 March 2017 DOI: 10.1007/s10462-01.
[8] Prerana T H M, Shivaprakash N C et al “Prediction of Heart Disease Using Machine Learning Algorithms- Naïve Bayes,Introduction to PAC Algorithm,
Comparison of Algorithms and HDPS”,Vol 3, PP: 90-99©IJSE, 2015.
[9] Salam Ismaeel, Ali Miri et al “Using the Extreme Learning Machine(ELM) technique for heart disease diagnosis”,IEEE Canada International Humanitarian
Technology Conference, DOI:10.1109/IHTC.2015.7238043, 03 September 2015.
[10] Salha M. Alzahani, Afnan Althopity, Ashwag Alghamdi, -“An Overview of Data Mining Techniques Applied for Heart Disease Diagnosis and Prediction”
Lecture Notes on Information Theory, Volume: 02, No. 04.
[11] H K Shifali, Dr. B. Srinivasu, Rajashekar Shastry, B N Ranga Swamy-“Mining of Medical Data to Identify Risk Factors of Heart Disease Using Frequent
Itemset”, International Research Journal of Engineering and Technology (IRJET),Volume: 04 Issue: 01.
[12] Prof. Mamta Sharma 1, Farheen Khan2, Vishnupriya Ravichandran “Comparing Data Mining Techniques Used For Heart Disease”, International Research
Journal of Engineering and Technology, Volume: 04 Issue: 06
[13] Abhishek Taneja - “Heart Disease Prediction System Using Data Mining Techniques”, oriental journal of computer science & technology, Volume: 06
[14] Priya R Patil -“Automated Diagnosis of Heart Disease using Data Mining Techniques".
[15] Aditi Gavhane, Gouthami Kokkula, Isha Pandya, Prof. Kailas Devadkar (PhD) ” Prediction of Heart Disease Using Machine Learning” Proceedings of the 2nd
International conference on Electronics, Communication and Aerospace Technology (ICECA 2018) IEEE Conference Record # 42487; IEEE Xplore
ISBN:978-1-5386-0965-1.
[16] 1Cincy Raju, 2Philipsy E, 3Siji Chacko, 4L Padma Suresh, 5Deepa Rajan S ” A Survey on Predicting Heart Disease using Data Mining Techniques” Proc.
IEEE Conference on Emerging Devices and Smart Systems (ICEDSS 2018) 2-3 March 2018, Mahendra Engineering College, Tamilnadu, India.