This paper describes using a random tree algorithm to classify different types of heart diseases based on electrocardiogram (ECG) signals. The algorithm was trained on ECG data from 9 different heart conditions. It was able to accurately detect bundle branch block and cardiomyopathy diseases based on test ECG data. The paper concludes that using more training data could increase the number and accuracy of heart conditions detected.
1. 1
Application of One Dimensional RandomTree in Diagnosis of Heart
Diseases
Abinash Kumar Panda1, Assistant prof. Bagyaveereswaran V2
1School of Electrical Engineering Vellore Institute of Technology,Vellore,Tamilnadu
2School of Electrical Engineering Vellore Institute of Technology,Vellore,Tamilnadu
ABSTRACT-Recent days the heart diseases are very prominent, sometimes its very confusing that which disease is the patient
is suffering from, this is just because different age group people has different heart rate . Sometimes doctors even get confused
which disease the patient is suffering from. This paper is all about confusion less detection of different types of diseases in heart
that patient suffers from. After doing classification we compared it with neural net classification
Index Terms—Random Tree Algorithm, TreeBagger, ECG(electro Cardio Graph),myocardial, Bundle branch block, Cardiomy-
opathy, Dysrhythmia, Healthy control, Heart failure (NYHA 4), Hypertrophy, Stable angina.
I. INTRODUCTION
USUALLYRecent days the number of cardiac patients is
increasing so there is a need to detect this disease more
accurately and diagnose these with natural and permanent
treatment instead of different types of operations. This can
only be done if the person himself will be able to know what
the present conduction of his heart is. Usually doctor detects
through Pulse and the ECG signals which uses 12 electrodes.
Different types of diseases have different types ECG signals.
Different age group peoples have also different type of ECG
signals corresponding to the same disease. So there is a lot
of confusion in detection of heart disease. In this paper we
have used an algorithm called Random Tree algorithm which
classifies different types of diseases depending on the ECG
signals feed to in, at the time of training of this random tree.
We have used MATLAB13a as our software for this operation.
In this we have used supervised learning by giving the tree the
input as the ECG signal and the corresponding disease as its
target. After detection of the specific disease this algorithm
will give a treatment recommendation. If this thing can be
implemented as an android application form then by the help
of their mobile phone they can detect the condition of their
heart and they can take proper diet for that, thereby avoiding
the unnecessary use of medicine in future and major operation
like reducing the consumption of food containing cholesterol.
The limitation of this paper is that it is limited to detection
of 9 types of disease as the training set contains 9 type of
disease. The thing is that if we feed this algorithm with more
no. of disease we can detect more number of diseases and the
accuracy will also increase.
1) TYPES DISEASE INCLUDED IN THIS PAPER
There are different types of disease in heart possible but
here we have taken 9 types of diseases which are described
as below. Before that we need to know what an ECG signal
is. ECG- this is the signal generated by heart in the form of
electrical impulse. These impulses are collected through 12
leads connected on our chest. There are different types of
characteristic on this ECG signals they are given below.ECG
.
is usually denoted by 5 important waves.as shown in figure P
,Q, R, S and T
P- Arterial depolarization
QRS- ventricular de polarization
T- ventricular re polarization
u-We do not usually see in ECG but in some
According to different types of diseases these wave varies
with time and through this we can detect different type of
diseases. The disease that we have taken in this paper are
given below in a brief way.
Fig. 1. INTERVAL BETWEEN DIFFERENT HEART SIGNAL SEGMENTS
A. ACUTE MYOCARDIAL
It is an alternate name for heart attack, usually heart attack
occurs when the blood can not reach to the heart to be
circulated. This may cause damage of tissue and may reduce
the life time. There are a number of factor influencing this is
high blood pressure, high cholesterol level and diabetes. Due to
presence of these things a plague is developed which decreases
2. 2
Fig. 2. ECG with scales
the blood in flow to heart. There are different symptoms for
this disease chest pain, nausea, vomiting [10].
B. BUNDLE BRANCH BLOCKS
When there is an irregularity in conduction of heart electri-
cal impulses then it is called bundle branch block. This causes
irregular path for ventricular depolarization. As its not going
to follow the usual path for this the conduction of impulse
signal will be very slow. This can cause a long ventricular
depolarization. Separate pace maker is used to control this
phenomenon [9].
C. PALPITATIONS
heart palpitations is a feeling of that heart is beating too
hard or too fast. Effect of this can be felt in chest throat or
neck. Usually this disease is not that much harmful it may
be cured by its own. This disease is caused because of stress
anxiety, excess amount of stimulant consumption like tea or
coffee, nicotine alcohol etc. in women it usually occurs during
pregnancy [7].
D. HYPERTROPHIC
In this disease the heart muscles get thicker and there a
reduced efficiency to pump blood from heart as the threat
volume decreases. This disease is not that much serious type.
Symptoms are rarely seen but as time pass the disease become
prominent and the condition goes serious. Symptoms are chest
pain, fainting etc [8].
E. STABLE ANGINA
In this disease there is a reduced flow of blood, due to
reduced flow of blood there is a reduced supply of oxygen
to the tissues. This may cause physical pain and some time
emotional stress. the pain in these diseases is little more
compared to unstable angina [5].
F. CONGESTIVE HEART FAILURE
In this disease the heart will not fail instead the heart
pumping power weakens. Due to this the heart pump blood
at a slower rate and the blood flow decreases. As a result
heart can not pump oxygen and nutrient to the whole body
as per its requirement. Due to this effect there may be failure
of all internal organs like kidney longs etc. for further detail
to you can prefer the link given here[6].
The corresponding diseased signals are given in the
figures
Different types of diseased ECG signals for the corresponding
disease are given below. These data are collected from
physio.net website. The data are usually used for research
purpose. The ECG signal that is taken in this paper is of 10
seconds and each second of the signal contains 1000 samples
per second. The some-total the whole signal contain 10000
sample and usually 12 complete heart cycles.
II. METHODOLOGY
In this project we have taken all type of heart ECG signals
which represents the corresponding diseases, these data are
collected from a site called physio.net. This site provides the
biomedical data for research application. The specification of
the signal is 1000 samples per second of heart signal and
the signal is of 10 second. Here we have summed up each
100 samples and represented it in one sample. We are doing
this process because the tree bagger algorithm cannot process
heavy amount of data so this process is needed. This process
needs some memory and some time to be done but as is
process in done at the time of starting of the program once
so it will not be a big deal. After this process we feed the
generated data to our random tree algorithm here we have
used 200 trees.
STEPS FOR DETECTION ALGORITHM
Step 1- Acquire the ECG signal.
Step 2- Reduce the signal in to signals of sample time having
100 samples.
Step 3- For each input and the corresponding output feed the
data to the tree
Step 4- Train the tree to classify.
Step 5- Take a test data set, convert it in to 100 samples.
Step 6- Feed that to the tree.
Step 7- detect the disease, diagnose it.
RANDOM TREE FORMATION IN MATLAB
After training of the tree we tested whether it is working
or not so we have taken different types of disease samples
and we converted that 10000 sample signal to sample of 100
the feed it to the tree. The test results are given here. We
conducted many test but here we mentioned only two results.
III. SIMULATION RESULT
b =
TreeBagger
Ensemble with 200 bagged decision trees:
Training X: [90x100]
Training Y: [90x1]
Method: classification
3. 3
Fig. 3. working flow diagram
Nvars: 100
NVarToSample: 10
MinLeaf: 1
FBoot: 1
SampleWithReplacement: 1
ComputeOOBPrediction: 0
ComputeOOBVarImp: 0
Proximity: []
ClassNames: ’1’ ’2’ ’3’ ’4’ ’5’ ’6’ ’7’ ’8’ ’9’
RESULT-1
r =
’9’
R
9
your heart condiction is not good you have Bundle branch
block disease
RESULT-2
r =
’8’
R =
8
your heart condiction is not good you have Cardiomyopathy
disease
A. all typer of heart signals
Fig. 4. ECG for heart failure
IV. CONCLUSION
From the abobe paper we conclude that random tree is
suffecient enough to detect different types of diseases in heart
patients through ECG signals If we feed more data in it the we
will achieve more accuracy in detection of different types of
diseases. Again if the no. of disease training set also increases
the n it can detect wider variety of heart diseases.
Fig. 5. ECG for Myocardia
Fig. 6. ECG for Stable Angiana
Fig. 7. ECG for Dysrhythmia
Fig. 8. ECG for Cardiomyopathy
Fig. 9. ECG for Hypertrophy
Fig. 10. ECG for bundled branch block
REFERENCES
[1] K.Srinivas,Dr.G.RaghavendraRao,Dr. A.Govardhan Analysis of Coronary
Heart Disease and Prediction of Heart Attack in Coal Mining Regions
4. 4
Using Data Mining Techniques, The 5th International Conference China.
August 2427, 2010.
[2] Jayshri,S. Sonawanel,D. R. PatiI Prediction of Heart Disease Using
Learning Vector Quantization Algorithm Conference on IT in Business,
Industry and Government 2014
[3] TGZimmerman,T Syeda-Mahmood Automatic Detection of Heart Disease
from, Twelve Channel Electrocardiogram Waveforms Conference on
Computers in Cardiology , 2007.
[4] data set taken from the site
www.physionet.org/cgi-bin/atm/ATM
[5] information about stable angina
www.healthline.com/health/stable anginaOverview1
[6] information about heart failure
www.webmd.com/heart-disease/guide-heart-failure
[7] information about heart-palpitations
www.webmd.com/heart-disease/guide/what-causes-heart-palpitations
[8] information about hypertrophic-cardiomyopathy
www.healthline.com/health/hypertrophic-cardiomyopathySymptoms2
[9] information about hypertrophic-cardiomyopathy
www.healthline.com/health/hypertrophic-cardiomyopathySymptoms2
[10] information about Bundle branch block
en.wikipedia.org/wiki/Bundle branch block
[11] information about myocardial infarction
www.healthline.com/health/acute-myocardial-infarction
Overview1