Amelioration of Cardiac Arrythmias Classification Performance Using Artificial Neural Network, Adaptive Neuro-Fuzzy and Fuzzy Inference Systems Classifiers

 Abstract — This paper aims at bringing a scientific contribution to the cardiac arrhythmia biomedical diagnosis systems; more precisely to the study of the amelioration of cardiac arrhythmia classification performance using artificial neural network, adaptive neuro-fuzzy and fuzzy inference systems classifiers. The purpose of this amelioration is to enable cardiologists to make reliable diagnosis through automatic cardiac arrhythmia analyzes and classifications based on high confidence classifiers. In this study, six classes of the most commonly encountered arrhythmias are considered: the Right Bundle Branch Block, the Left Bundle Branch Block, the Ventricular Extrasystole, the Auricular Extrasystole, the Atrial Fibrillation and the Normal Cardiac rate beat. From the electrocardiogram (ECG) extracted parameters, we constructed a matrix (360x360) serving as an input data sample for the classifiers based on neural networks and a matrix (1x6) for the classifier based on fuzzy logic. By varying three parameters (the quality of the neural network learning, the data size and the quality of the input parameters) the automatic classification permitted us to obtain the following performances: in terms of correct classification rate, 83.6% was obtained using the fuzzy logic based classifier, 99.7% using the neural network based classifier and 99.8% for the adaptive neuro-fuzzy based classifier. These results are based on signals containing at least 360 cardiac cycles. Based on the comparative analysis of the aforementioned three arrhythmia classifiers, the classifiers based on neural networks exhibit a better performance.

I. INTRODUCTION HE rapid evolution of heart diseases is increasingly becoming a major health challenge in the world today.This is demonstrated by the high and increasing mortality rate resulting from heart related diseases [1].In efforts to diagnose these diseases, cardiologists face diverse difficulties in showing a reliable diagnosis of patients suffering from cardiac arrhythmias.They are hindered by the presence of noises that disturb the phase and amplitude characteristics of the signal.These noises come from processes other than heart muscles.They are of physiological and environmental origin [2].In the last decade, different groups of researchers in an attempt to (4) MATLAB Graphical User Interface respectively for the Artificial Neural Network, Adaptive Neuro-Fuzzy and the Fuzzy Inference Systems; (5) MATLAB Commands needed to access the Graphical User Interface for each system, the command "nnstart" for the Artificial Neural Network, the command "fuzzy" for the fuzzy inference system and "anfisedit" for the adaptive neuro-fuzzy system.Taking into consideration the method, it has been defined successively into the followings steps as illustrated in Fig. 1  Based on this backdrop, the approach we adopted to eliminate the noises involved the use of low-pass filters followed by high-pass filters.

Band Pass Filter
The band pass filter used reduces the influence of muscle noise, 50 Hz interference, baseline wander and P-wave interference.The desirable bandwidth to maximize QRS complex energy is around 5-30 Hz.The bandpass filter used is a cascading of the low pass and high pass filters [15].
The differential equation of the low pass filter is: where x (T) and y (T) are respectively the input and output signals of the filter.
The differential equation of the high pass filter is: where x(T) and y(T) are respectively the input and output signals of the filter.

Derivative Filter
After filtering, the signal is differentiated to provide information on the slope of the QRS complex.The differential equation of the differentiating filter is:

Quadratic Summation
After differentiation of the signal, we proceed to the quadratic summation point by point according to: This function allows us to have positive data point.

Threshold
After the quadratic summation process, an appropriate threshold is selected to successfully determine the QRS complex.The threshold is chosen so as not to lose any parameters of the QRS complex of the ECG signal.The application of thresholding is possible because the amplitude of the R wave is maximum among the characteristics of the ECG signal.

D. Detection of the QRS Complex
As part of our research, we used the Pan & Tompkins method with a detection rate of 99.3%, which is the best performing one.This method is presented in 5 steps: Low pass filtering, high pass filtering, derivation, quadratic summation, and thresholding.The method of Pan & Tompkins has a detection rate equal to 99.3% which consists of 5 steps: Low pass filtering, high pas filtering, derivation, nonlinear transformation and integration.Detection errors appear for particular cases (records 108,222 of the MIT-BIH database).

E. The Fuzzy Logic Approach
Basic Principle Let C = {C 1 , C 2 , …… C N }, a set of classes representing possible N cardiac arrhythmias.Let X be a description or an observation made on any class of arrhythmia in the form of a real vector of M elements: X= [X 1 ;X 2 ;… ;X M ].Each element of X represents characteristic parameter of the ECG signal.
A classifier based on the fuzzy logic approach is an application: The result of the classification is given by: where µ N (X) represents the degree of membership of X in the class Ci.  6) Definition of the membership functions μ N (X) of the input and output parameters of the system in language understandable by the system; (7) Establishment of fuzzy rules of the system from which classifications will be made.

Basic Principle
The network of artificial neurons in general is a large interconnected network of a large number of computing elements or computing functions called neurons arranged in an architecture inspired by the network of biological neurons of the human brain.The activation function used is the sigmoid function; Backpropagation is the process of propagating to the inner layers the error made at the output to change the weights.The error between the desired output d (n) and the actual output x (n) is computed in terms of the quadratic sum: E (n) = ∑   where e(n) represents error at each output neuron.The backpropagation algorithm adjusts the connection weights of the neural network so as to minimize the sum of quadratic errors on all output neurons [16].

G. The Hybrid Approach Neural Network and Fuzzy Logic
This approach is a learning mechanism that uses training and learning algorithms for the neural network to find input parameters of the system based on the fuzzy logic approach.

III. RESULTS
As can be seen in Fig. 2, the raw original ECG signal from annotated patient 100 of the MIT-BIH arrhythmias database shows a baseline drift presumed to be isoelectric due to wrong electrode contacts or patient movements.
In Fig. 3, the blue curve represents the raw original ECG signal of the same annotated patient 100 in the MIT-BIH arrhythmias database.This blue curve shows baseline drift as in Fig. 3.A MATLAB subroutine has been written to suppress this drift from the baseline due to wrong electrodes contacts or patient movement.This permits us to have the ECG signal or the red curve that is now isoelectric.
The ECG signal of annotated patient 100, deprived of baseline drift, is passed through a low-pass filter which in turn reduces the influence of muscle noise.We obtain the curve of Fig. 4 filtered from noises due to non-cardiac muscles or patient movement.The high pass filter in turn, at its input, takes the signal from the low pass filter and gives at its output the signal of Fig. 5.That signal is reduced from the influence of the interference of the electrical network 50 Hz/60 Hz and the interference of the P wave.
After the low-pass filtering and high pass successively, the ECG signal is differentiated through a derivation filter to provide the information concerning the slope of the QRS complex as seen in Fig. 6.
At the output of the derivation filter the signal is squared.We proceed to the quadratic sum of the signal moving from point to another.This function makes it possible to obtain positive data points as shown in the curve of Fig. 7, which obviously begins at the zero ordinate.
After the quadratic summation process, an appropriate threshold is selected to successfully determine the QRS complex.The threshold is chosen so as not to lose any parameters of the QRS complex of the annotated patient's ECG signal 100 as shown in Fig. 8.

Arrhythmia Classification Using Fuzzy Inference System Classifier
The ECG signal inputs data from annotated patient 100 of MIT-BIH Arrhythmia Database have been extracted and selected from P, QRS and T waves using Pan and Tompkins QRS Complex Detection algorithm and the results are:  IFuzzy= [HRV bpm PQ t QRS t QT t ST t PR t ]  IFuzzy = [69.9029210.0000 110.0000 310.0000 310.0000 160.0000]The IFuzzy input data of the fuzzy logic-based classifier are one-sided matrix with 6 different time parameters (the heart rate variation, the PQ, QRS, QT, ST, PR segments and time intervals of the ECG signal).These 6 parameters vary in a very precise interval previously defined by a cardiologist.The

Arrhythmia Classification Using Artificial Neural Network Classifier
The same process used to extract and select parameters for the FIS classifier is also used for the ANN Classifier with the difference that instead of only 6 temporal parameters now 10 morphological and temporal parameters (P, QRS, T amplitudes and time intervals) are extracted as:

IV. DISCUSSION
We obtained the performance results for each classifier based on fuzzy logic, neural networks and adaptive neurofuzzy and their classification rates can be seen in Table III.On the basis of our research and results obtained and also according to other authors [7]-[18], we can affirm that the performance of a classifier depends on three parameters: the quality of learning, the size of the data and the parameters chosen at the input of the classifier.In Table III, we notice that the classifiers using the artificial neural network are performing better when they have large data size while the classifier using fuzzy inference system is performing better when it uses small data size.Table IV presents a comparative study of correct classification percentage's results of some authors.The table indicates that a majority of authors worked with a single type of arrhythmias classifier.This research on the other hand combines the above mentioned three types of cardiac arrhythmias classifiers.A comparison with previous researches was performed and promising results were found except for the fuzzy classifier.

: ( 1 )
Acquisition of the raw digitized ECG Signal; (2) Denoising of the raw digitized ECG signal; (3) Detection of the P, T waves and Q, R, S ventricular waves (QRS Complex); (4) Extraction of morphological and temporal characteristic parameters; (5) Selection of the most important characteristic parameters; (6) Cardiac Arrhythmias Classification.

Fig. 1 Flow
Fig. 1 Flow Diagram of research methodology B. Acquisition of the Raw Digitized ECG Signal The database used in the classification was obtained from the PhysioBank ATM database (MIT-BIH Arrythmia Database) of the cardiology department of Beth Boston Hospital in Israel (accessible online at physionet.org).This database contains 48 recordings of ECG signals obtained from 47 different patients.These recordings are collected following the Wilson's unipolar precordial leads (V1, V2, V3, V4, V5 and V6).C. Denoising of the Raw Digitized ECG SignalThe ECG signals contain some noises and artifacts from the recording.They must be treated.The noises and artifacts degrading the ECG signals during the recording are[14]:  Variations in the baseline resulting from very low frequency ripples from bad electrode contact or patient movement.This line must be isoelectric,

FIS Algorithm ( 1 )
Extraction of the temporal and morphological parameters as the amplitudes and the time interval values of the different P-QRS-T waves; (2) Selection according to the opinion of an expert or a cardiologist among the extracted parameters, the most significant characteristic parameters in the classification of a cardiac arrhythmia; (3) Construction of a single-sided matrix X (1xM) of M elements (X = [X1; X2; ....; XM]) where X1 to XM represent the above temporal parameters extracted and selected according to the cardiologist's opinion; (4) Definition of the above single-sided matrix X = [X1; X2; ....; XM] as the input data for the FIS Classifier; (5) Definition of output data: C = {C 1 ,C 2 , …… C N }, a set of classes representing possible N cardiac arrhythmias for the FIS Classifier; (

ANN Algorithm ( 1 )
Extraction of the temporal and morphological parameters as the amplitudes and the time interval values of the different P-QRS-T waves; (2) Selection of the most significant characteristic parameters in the classification of a cardiac arrhythmia among the extracted parameters.This is done according to the opinion of an expert or a cardiologist; (3) Construction of the input sample database X = [X1; X2;..; XM].X represents nxn matrix where X1 to XM represent the above morphological and temporal parameters extracted and selected according to the cardiologist's opinion; (4) Choice of the output sample database, C = {C1, C2, ....., CN}, a set of classes representing possible N cardiac arrhythmias for the ANN Classifier; (5) Learning of the artificial neural network via a recognized learning by down-gradient descent of the neuron network to classify the input data X = [X1; X2; .. ; XM] corresponding to the output classes C = {C1, C2, ..., CN}.

World
Fig. 2 Baseline Wander

World
Academy of Science, Engineering and Technology International Journal of Medical and Health Sciences Vol:13, No:9, 2019 423 International Scholarly and Scientific Research & Innovation 13(9) 2019 ISNI:0000000091950263 Open Science Index, Medical and Health Sciences Vol:13, No:9, 2019 publications.waset.org/10010777/pdfdifferent combinations of the variations of these parameters define the different cardiac arrhythmias as shown in Fig. 9, with the input data IFuzzy = [69.9029210.0000 110.0000 310.0000 310.0000 160.0000].That input data define a normal heart rhythm without arrhythmia.

Fig. 4
Fig. 4 Low Pass Filter Table I shows us that six cardiac arrhythmias (Normal, Right and Left bundle branch block, Auricular and Ventricular Extrasystole, Atrial fibrillation) have been tested and classified with the FIS Classifier using 360 datasets of cardiac cycles in each case of arrhythmia.For each arrhythmia we have the accuracy rate of the FIS classifier in terms of the correct classification percentage.Positive: Classifier classifies right arrhythmia class; FN = False Negative: The classifier does not classify; FP = World Academy of Science, Engineering and Technology International Journal of Medical and Health Sciences Vol:13, No:9, 2019 424 International Scholarly and Scientific Research & Innovation 13(9) 2019 ISNI:0000000091950263 Open Science Index, Medical and Health Sciences Vol:13, No:9, 2019 publications.waset.org/10010777/pdfFalse Positive: Classifier classifies wrong arrhythmia class.

Fig. 11 presents
ECG signal inputs data from patient 100 of MIT-BIH Database after extraction and selection of P, QRS and T parameters based on Pan et Tompkins QRS Complex Detection algorithm.

Learning
Quality and Data Size During our work and tests when we varied the parameters below it improved the quality of each classifier: FIS performs better when:  There is variation in the use of membership functions other than triangle functions,  Number of hidden layers and numbers of neurons is at least 25; ANN performs better when:  Large data size is used (at least 360 cardiac cycles)  Number of hidden layers and numbers of neurons is at least 25 ANFIS performs better when:  There is variation in the use of membership functions other than triangle functions,  The higher the number of fuzzy rules, the more efficient the system is;  Large data size is used (at least 360 cardiac cycles)  Number of hidden layers and numbers of neurons is at least 25 Parameters Representing the Input Data FIS performs better when:  There are more temporal parameters extracted with a range of values determined by a cardiologist;  Time domain is used instead of frequency domain.ANN performs better when:  There is more extracted temporal parameters;  Time domain is used to extract ANN electrocardiogram parameters.ANFIS performs better when:  There is more temporal and morphological parameters extracted; Time domain is used to extract ANFIS electrocardiogram parameters.

Table
II shows us the percentage of correct classification for each cardiac arrhythmia.