Reach Us +44-1522-440391
Heart Disease Diagnosis Using Data Mining Techniques | OMICS International
ISSN: 2162-6359
International Journal of Economics & Management Sciences
Make the best use of Scientific Research and information from our 700+ peer reviewed, Open Access Journals that operates with the help of 50,000+ Editorial Board Members and esteemed reviewers and 1000+ Scientific associations in Medical, Clinical, Pharmaceutical, Engineering, Technology and Management Fields.
Meet Inspiring Speakers and Experts at our 3000+ Global Conferenceseries Events with over 600+ Conferences, 1200+ Symposiums and 1200+ Workshops on Medical, Pharma, Engineering, Science, Technology and Business
All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

Heart Disease Diagnosis Using Data Mining Techniques

Ramin Assari1*, Parham Azimi2 and Mohammad Reza Taghva1

1Department of IT Management, Allameh Tabataba’i University, Tehran, Iran

2Faculty of Mechanical Engineering and Industrial Engineering, Islamic Azad University, Qazvin, Iran

*Corresponding Author:
Ramin Assari
IT Management, Management Department
Allameh Tabataba’i University, Iran
Tel: 98 2144737510
E-mail: [email protected]

Received Date: December 13, 2016; Accepted Date: March 27, 2017; Published Date: March 29, 2017

Citation: Assari R, Azimi P, Taghva MR (2017) Heart Disease Diagnosis Using Data Mining Techniques. Int J Econ Manag Sci 6: 415. doi: 10.4172/2162-6359.1000415

Copyright: © 2017 Assari R, et al.. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Visit for more related articles at International Journal of Economics & Management Sciences


In recent decades, heart disease has been identified as the leading cause of death across the world. However, it is considered as the most preventable and controllable disease at the same time. According to World Health Organization (WHO), the early and timely diagnosis of heart disease plays a remarkable role in preventing its progress and reducing related treatment costs. Considering the ever-increasing growth of heart disease-induced fatalities, researchers have adopted different data mining techniques to diagnose it. According to results, application of the same data mining techniques leads to different results in different datasets. This study tries to assist healthcare specialists to early diagnose heart disease and assess related risk factors. To this end, the main heart disease diagnosis indices were identified using experts’ opinions. Then, data mining techniques were applied on a heartrelated dataset. Finally, the main heart disease diagnosis indices were identified and a model was developed based on extracted rules. Visual Studio was used to write the algorithm code.


Bayesian network; Data mining; Decision tree; Heart disease; K-nearest neighbor; Support vector machines


In the past decade, heart disease has been the leading cause of death in different continents and countries in the world, regardless of the income level of countries [1]. According to WHO report, heart disease is the leading cause of death across the world, accounting for 7.2 million deaths, i.e., 12.8% of all fatalities in the world [2]. Figure 1, illustrates deaths from heart disease across the world (scale: 1:100000). According to recent research predictions, cardiovascular diseases will become the leading cause of death up to 2030.


Figure 1: Heart diseases-induced fatalities across the world in 2013.

Although cardiovascular diseases have been identified as the leading cause of death in the world in the past decade, they have been introduced as the most preventable and controllable diseases [3]. The complete and correct treatment of a disease depends on the timely diagnosis of that disease [4]. An accurate and systematic tool for identifying high-risk patients and extracting data for timely diagnosis of heart disease seems a critical need.

Every day, modern computer-based systems collect large amounts of data using automatic data record systems in different fields. Data mining technology is the product of the evolution of database technology, IT and storage devices [5]. The current challenge is to make data mining and knowledge discovery systems applicable to a wider range of domains [6]. Researchers are adopting data mining techniques to diagnose different diseases including diabetes [7], stroke [8], cancer [9] and heart disease [10]. Considering the high rate of cardiovascularinduced fatalities, researchers have tried to adopt data mining systems to diagnose heart disease [11].

Literature Review

Every day, modern computer-based systems collect large amounts of data using automatic data record systems in the healthcare field where data mining can extract a valuable knowledge from them. The next section briefly explains heart disease and the application of data mining techniques in treating such diseases.

Heart disease

As the leading cause of death in the world, heart disease, according to WHO, accounts for 3.8 million and 3.4 million deaths in males and females, respectively.

The symptoms and incidence of heart disease differ from one person to another. However, they commonly include chest pain, jaw pain, neck pain, back pain, stomach disorders; arms and shoulders pains and shortness of breath [12]. Different heart problems induce different heart diseases including coronary artery disease, heart failure and stroke [13].

Although heart disease has been identified as the most chronic disease across the world, it is the most preventable one at the same time. A healthy life style (primary prevention) and timely diagnosis (secondary prevention) are two main elements of heart disease control. Conducting regular check-ups (secondary prevention) plays a remarkable role in the diagnosis and early prevention of heart disease complications [14]. Several tests including, chest X-rays, angiography, echocardiography and exercise tolerance test contribute to this important issue. However, these tests are costly and require accurate medical equipment.

Applications of data mining to healthcare data

Data mining scholars have long studied the application of tools and equipment in improving the process of data analysis in large and complex datasets. Adopting data mining techniques in the medicine field is of high importance in diagnosing, predicting and deeply understanding of healthcare data. These applications include treatment centers analysis aimed at improving treatment policies and prevention of any mistake in hospitals, early diagnosis of diseases, prevention of diseases and hospital death reduction.

Heart specialist’s record and store large amounts of patients’ data. This provides a great opportunity for extracting a valuable knowledge from such datasets. Researchers are adopting statistical approaches as well as data mining techniques to help treatment and healthcare specialists diagnose and determine heart disease risk factors in patients. Statistical analyses have identified a number of risk factors for heart diseases including age, blood pressure, smoking [15], total cholesterol [16], diabetes [17], and hypertension, heart disease background in family, obesity and lack of physical activity [18]. The awareness of heart disease risk factors assists treatment and healthcare specialists to identify patients who are subject to high risk factors.

Researchers have employed different data mining techniques to help specialists and physicians diagnose heart disease [19]. Some techniques are more common such as Naïve Bayes, decision tree and K-nearest neighbor. However, there are other classification-based data mining techniques such as kernel density, neural network, bagging algorithm, sequential minimal optimization, direct Kernel selforganizing map and support vector machine. The next section briefly explains those techniques which were used in this study.

Decision tree

There are different types of decision trees. They only differ in the mathematical model they use to select the class of attribute during rule extraction. Gain ratio decision tree is the most common, successful type [20]. It is a relationship between entropy (information gain) and classified information.

In entropy technique, the attribute which minimizes entropy and maximizes information gain is selected as the tree root. To select tree root, it is first necessary to calculate the information gain of each attribute. Then, the attribute maximizing information gain should be selected. Information gain, or entropy, is derived from relation 1.3 [21].

equation (2-1)

Where k is the number of response variable classes, pi is the ratio of the number of the ith class events to total number of samples (occurrence probability of i)

Bayesian network

Bayesian network is a statistical technique predicting the membership class of the studied sample using the probability theory. Bayesian network practices classification process in accordance with Bayes’ theorem. It assumes that the influence of the value of a theorem on a class is independent from the influence of other attributes. This assumption is called “class conditional independence”. This assumption was made to simplify engaged calculation and this is why it was named “Naïve”, i.e., simple.

This technique calculates the prior probability of the response variable and the conditional probability of other variables. The prior and conditional probabilities of the initial training are calculated. Then, for every test dataset sample, the probability of the occurrence (presence) of each case of response variable is calculated. Afterwards, the response variable with the highest occurrence probability is selected. The probability of test sample for the response variable value is derived from relation 4.3 [22].

equation (2-2)

Where V, ci, aj and vj are test sample, response variable value, data attribute and the test sample value, respectively.

K-nearest neighbor

This classification technique is called a memory-based technique, since the training samples should be stored in memory during runtime [23-27].

If a is the first sample denoted by (a1, a2,…, an), and b is the second sample denoted by (b1, b2,…, bn), the distance between them is calculated by relation 2-3.

equation (2-3)

Support vector machine

Given availability of support vectors, Support Vector Machine (SVM) is the boundary determining the best data classification and separation. In SVM, only those data lying inside support vectors are used as the base data for machine and building a model. This means that this algorithm is not sensitive to other data. It aims to find the best data boundary with the farthest possible distance from all classes (their support vectors). SVM transfers data to a new space with respect to their predetermined classes so that data can be classified and separated linearly (using hyperplanes). Then, it searches for support lines (or support planes in multi-dimensional space) and tries to determine the equation of a straight line that maximizes the distance between each two classes. Each support vector is characterized with an equation describing the boundary line of each class.


This study used Cleveland Clinic Foundation dataset known as “Cleveland Clinic Foundation Heart Disease Dataset”. This dataset included 13 attributes (Table 1) and 303 samples, 3 of which were incomplete and hence excluded from this study. The continuous values of this dataset were discretized using equal frequency method. This technique classifies continuous values into 5 classes.

Name Type Description
Age Continuous Age in years
Sex Discrete 1=male
Cp Discrete Chest pain type:
1-typical angina
2-atypical angina
3-non-angina pain
Trestbps Continuous Resting blood pressure in (mm Hg)
Chol Continuous Serum cholesterol in (mg/dl)
Fbs Discrete FBS>120 (mg/dl)
Restecg Discrete Resting electrocardiographic results:
1-having ST-T wave abnormality
2=showing probable or defined left ventricular hypertrophy
Thalach Continuous Maximum heart rate achieved
Exang Discrete Exercise-induced angenia:
Old peak ST Continuous Depression induced by exercise relative to rest
Slope Discrete The slope of the peak exercise segment:
1=up sloping
3=down sloping
Ca Discrete Number of major vessels colored by fluoroscopy that range between 0 and 3
Thal Discrete 3=normal
6=fixed defect
7=reversible defect
Diagnosis Discrete Diagnosis classes:
2=patient who is subject to possible heart disease

Table 1: Cleveland clinic foundation heart disease dataset indices.

Selected data mining techniques were applied on the studied dataset after dataset discretization. 10-fold cross-validation method was used to validate the results. This technique classifies dataset into 10 portions. 9 portions were used for training the algorithm and 1 portion was used for evaluation in each run-time. The process was repeated 10 times. This procedure is helpful specifically in datasets with small number of samples by prevention of over-fitting. Finally, the sensitivity, specificity and accuracy of each method were calculated.

Sensitivity is the ratio of true positives. Specificity is the ratio of true negatives. Accuracy is the ratio of true positives and true negatives combined (relations 2.4 to 2.6).

Sensitivity=True Positive/Positive (2-4)

Specificity=True Negative/Negative (2-5)

Accuracy=(True Positive + True Negative)/(Positive + Negative) (2-6)


This section compares the accuracy, sensitivity and specificity of the employed techniques in terms of their confusion matrices.

Decision tree, Naïve Bayes, K-Nearest Neighbor and Support Vector Machine were applied to the studied dataset. Table 2 shows the sensitivity, specificity and accuracy of these data mining techniques. Their accuracy ranges from 79% to 84.33%. According to Table 2, SVM achieved the highest accuracy (84.33%).

Accuracy Specificity Sensitivity Method
0.79 0.8148 0.7608 Decision Tree
0.8366 0.8641 0.8043 Naïve Bayes
0.81 0.8395 0.7753 KNN K=7
0.8433 0.895 0.7826 SVM

Table 2: Results of employed data mining techniques.

SVM and Naïve Bayes achieved the highest accuracy, followed by KNN (k=7 resulted in the best accuracy as compared to other values) and decision tree, respectively. Weka and IBM SPSS Modeler were used to implement data mining techniques.

Identification of influential factors

After implementing the above mentioned techniques and performing related analyses, the following influential indices were identified. Table 3 compares all 13 input attributes in terms of their significance based on the results obtained from each technique. The variables thal (0.187), ca (0.185) and cp (0.152) had the highest significance in all 4 employed techniques respectively, followed by trestbps (0.03) and chol (0.032) as the lowest. Figure 2 compares the attributes in terms of significance.

Attribute Importance degree Avg.
Naïve Bayes KNN K=7 SVM Decision Tree
Age 0.7 0.08 - 0.01 0.04
Sex - 0.08 0.06 0.05 0.047
Cp 0.11 0.08 0.18 0.24 0.152
Trestbps 0.04 0.08 - - 0.03
Chol 0.05 0.08 - - 0.032
Fbs 0.06 0.08 0 - 0.035
Restecg 0.07 0.08 0 - 0.037
Thalach 0.05 0.07 0.09 - 0.052
Exang - 0.08 0.09 0.08 0.062
Oldpeak 0.09 0.07 0 0.04 0.05
Slope - 0.07 0.13 0.04 0.06
Ca 0.21 0.08 0.25 0.2 0.185
Thal 0.15 0.08 0.19 0.33 0.187

Table 3: Significance comparison of input indices in each method.


Figure 2: Comparing significance of input indices in each method.


Heart disease is the leading cause of death across the world. It accounts for 7.2 million deaths, i.e., 12.8% of fatalities in the world. Although cardiovascular diseases have been identified as the leading cause of death in the past decade, they are the most preventable and controllable diseases at the same time. Deaths from cardiovascular diseases show an ever-increasing trend. On the other hand, their early diagnosis plays an important role in improving patients’ health status and decreasing fatalities. Therefore, this study aimed to aid physicians to early diagnose such diseases and assess heart disease risk factors in studied individuals. After studying different papers, selecting different data mining techniques and implementing them on the selected dataset, SVM technique achieved the highest accuracy (84.33%). In SVM as well as the other employed techniques, thal, ca and cp were introduced as the most influential indices on average. This technique is expected to be implemented in future on a localized dataset with nonaggressive indices in general. This, in turn, imposes lower costs and complications on patients.


Select your language of interest to view the total content in your interested language
Post your comment

Share This Article

Relevant Topics

Article Usage

  • Total views: 4702
  • [From(publication date):
    June-2017 - Jul 22, 2019]
  • Breakdown by view type
  • HTML page views : 4110
  • PDF downloads : 592