Bidirectional Recurrent Neural Network based Early Prediction of Cardiovascular Diseases using Electrocardiogram Signals for Type 2 Diabetic Patients
Correspondence Address :
T Tamilselvan,
5th Mile, Tadong East, Gangtok, Sikkim, India.
E-mail: tamilselvan.t@srmus.edu.in
Introduction: The electrocardiogram (ECG) signal is important for early diagnosis of heart abnormalities. Type 2 diabetic individuals’ ECG signals provide pertinent data about their heart and are one of the most important diagnostic techniques used by doctors to identify Cardiovascular Disease (CVD). Bidirectional Recurrent Neural Network (RNN) classifies the features linked to normal and abnormal stage ECG signal.
Aim: To analyse ECG signals of type 2 diabetic patients for early prediction of CVDs using feature extraction and bidirectional RNN based classification.
Materials and Methods: This was a secondary data-based modelling study at Shri Ramasamy Memorial University Sikkim, India from December 2020 to January 2022. Different noises were removed by hybrid preprocessing filter made up of a Median and Savitzky-Golay filter. Undecimated Dual Tree Complex Wavelet Transform (UDTCWT) along with Detrended fluctuation (DA) analysis and Empirical Orthogonal Function (EOF) analysis were then used to extract features. These features were classified with Bidirectional RNN.
Results: The proposed method was tested on the MIT-BIH, Physionet and DICARDIA databases, and the findings showed that it achieves an average accuracy of 97.6% when compared to the conventional techniques.
Conclusion: The proposed method proves to be the most effective way for detecting anomalies in ECG signals in both the early and pathological stages. This method is also effective to diagnose the early intervention of cardiovascular symptoms.
Median and savitzky-golay filter, Undecimated dual tree complex wavelet transform
Heart monitoring has become an essential diagnosis for human health as the heart is amongst the most fundamental systems of the human body. The most significant information about the heart’s health comes from an ECG analysis (1). An irregular ECG can cause atrial fibrillation, tachycardia, low blood pressure, and fast atrial fibrillation, all of which can lead to cardiac illness, such as prolonged ventricular tachycardia and Cardiovascular Diseases (CVDs). Stroke and heart failure are also more likely in people with type 2 diabetes. These illnesses are life-threatening and require immediate medical help (2).
The electrical activity of the heart is indicated by the ECG signal. To diagnose a cardiac problem, variations in the amplitude and duration of the ECG signal from a preset pattern have been widely used. The ECG signal is separated into several distinct waveforms, including P, QRS, and T waves in that order, as well as portions called PR, QT, and ST (3). Each component has a unique role and provides predictive data for different heart conditions. ECGs are typically recorded with twelve leads, however other numbers of leads are utilised to evaluate cardiovascular disorders. Due to the difficulties of manually interpreting these fluctuations, a computer-aided diagnosis system can assist in cardiac health monitoring. Non linear extraction methods are attractive candidates for obtaining information from the ECG signal because of its non linear and non stationary character (4).
Several approaches based on transform domain-based feature extraction in ECG signal have been proposed (5),(6),(7). The effectiveness of monitoring for CVDs in non pathological diabetic people has recently been addressed (8),(9). For the categorisation of ECG signals, neural network-based models have been developed (10).
Principal component analysis approaches have been used to detect heart rate variability for the analysis of CVDs (11). K-Means clustering using squared Euclidean distance-based methods have been employed for ECG signal processing (12). By detecting features like P, QRS complex from ECG data, analysis and characterisation of normal and abnormal ECG patterns gets higher performance (13). Time domain and frequency domain based features are extracted from the ECG signal for CVD analysis (14). It has been proposed to use a pulse oximeter signal to check for the beginning of type-2 diabetes (15). Machine learning based approaches have been utilised for categorising features from ECG signal (16).
Existing methods have the issue of classifying the ECG signal into normal and abnormal. To overcome this issue the proposed method implements the hybrid preprocessing filter with fused features been classified with bidirectional RNN to detect the early stage and abnormal stage of ECG signal prediction. By analysing the ECG signal features several times, the bidirectional RNN classifies the features linked to early stage and abnormal stage ECG signal in an ideal manner, ensuring correct signal analysis. The proposed work analyses type 2 diabetics ECG data using feature extraction and Bi-RNN based classification. The main objective was to evaluate the predictive significance of ECG abnormalities in Type 2 diabetes mellitus patients without a history of cardiovascular illness.
This was a secondary data-based modelling study. The secondary data as depicted in (Table/Fig 1) shows the ethically approved observational study been taken from different sources, Diabetic Cardiac Neuropathy Diagnostic and Modelling Database Signals (DICARDIA) (17),(18), Physionet PTB Diagnostic ECG database (19). The study was done at Shri Ramasamy Memorial University Sikkim, India for a period of 1.2 years from December 10, 2020 to January 2022. Since there was no human or animals being used and the modelling done purely based on secondary public domain, no ethical clearance was needed for the same. The study was duly approved by Institutional Research Cell vide Ref. SRMUS/PhD/EC/IT/2022/1.
Data Description
The collected dataset was the combination of three popular widely available dataset like Diabetic Cardiac Neuropathy Diagnostic and Modelling Database Signals (DICARDIA), physionet PTB Diagnostic ECG database and MIT-BIH Arrhythmia Database. (Table/Fig 1) shows the collected database details for diabetics with and without cardiac complications, resolution, frequency and the ECG signal recording characteristics (18),(19),(20).
Inclusion criteria:
• ECG database that were free available as secondary ECG datasets.
• ECG of diabetic patients with and without cardiac complications.
• Only Type 2 diabetic patients ECG signals datasets.
Exclusion criteria:
• Database that was not authenticated.
• Datasets which were not in complete form.
Methodology
The process flow of proposed Bidirectional RNN model to early prediction of CVDs from ECG signal is depicted in (Table/Fig 2). Different noises are removed by hybrid preprocessing filter that is composed of Savitzky-Golay and Median Filter. The features viz., QRS complex and RR interval from the ECG signal were analysed by Undecimated Dual Tree Complex Wavelet Transform (UDTCWT) along with Detrended fluctuation (DA) analysis and Empirical Orthogonal Function (EOF). From the features the signals were classified by Bidirectional RNN model.
Preprocessing
Hybrid preprocessing filter: The initial process of preprocessing in the diagnosis of heart disease is to retrieve the original signal and eliminate the noise signal. Due to noise and abnormalities in the ECG data, clinical evidence is improperly evaluated, and CVD disorders are incorrectly diagnosed. ECG recordings contain a variety of disturbances such as baseline wander, Electromyographical (EMG) noise, and electrode motion artefact noise, as well as powerline interference, channel noise, composite, and random noises. The median filter (21) and the Savitzky-Golay filter (22) work together to remove all types of interference from the ECG signal. The process of noise removal has been shown in (Table/Fig 3).
Initially, the ECG signal E(t) was processed by the Savitzky-Golay filter (22) (E?SUB?SG#SUB#(t)) to remove the baseline wander noise shown in equation (1).
ESG (t)=E(t) (1)
Then the signal was again filtered using the median filter M(t) to remove the remaining noises that existed in the ECG signal. The median filter’s fundamental principle is to go over the signal entry by entry, replacing each one with the median of the entries next to it. The “window” is a pattern of neighbours that slides over the entire frequency range, entry by entry.
E?SUB?SG_M#SUB#(t)=M(E?SUB?SG#SUB# (t)) (2)
Feature Extraction
After preprocessing, the features were extracted with the combination of three different feature extraction techniques such as UDTCWT (23) with DA (15) analysis and EOF (24) analysis. UDTCWT produces two different type of features namely peak value detected by thresholding and amplitude. Detrended fluctuation analysis detects two different features to analysis the heart rate variations. Empirical orthogonal function gives single feature to represent the maximum spots.
B#BUDTCWT:B?B As tiny changes in ECG signals are difficult to identify with visual inspection, detecting aberrant stages of heart disease in diabetes individuals, such as cardiac arrhythmias, is challenging. The UDTCWT coefficients aid in detecting peak values in the QRS complex signal, as slight fluctuations in these signals accurately reflect diabetic heart illness. The preprocessed ECG signal ESG_M(t) is splitted by UDTCWT into detailed coefficients ESG_M(t)D and approximate coefficients ESG_M(t)A. The detailed coefficients provide the peak information in the ECG signal and the approximate coefficients provide lower value information in the ECG signal. By increasing and decreasing the signal values, the coefficients are retrieved from the QRS complex of each cardiac cycle and combined with the characteristics extracted from the third decomposition levels of UDTCWT.
UDTCWT (E?SUB?SG_M#SUB#(t))=ESG_M(t)?SUB?D#SUB# + E?SUB?SG_M#SUB#(t)?SUB?A#SUB# (3)
The detailed and approximate coefficients in each subsequent level are shown in equation 4 and 5.
(4)
(5)
In level 3, the detailed coefficients and approximate coefficients were reconstructed by inverse transform IUDTCWT (ESG_M(t)) and given to selective thresholding algorithm which selects the suitable threshold to the detailed and approximate feature information in the third decomposition levels (Table/Fig 4).
(6)
E?SUB?SG_M#SUB#(t)= IUDTCWT(E?SUB?SG_M#SUB#(t)) (7)
The selective thresholding algorithm uses precise filters on the UDTCWT signals to extract the peak signal from the other signals. The peak value in the decomposed ECG signal represented in equation was picked out by these filters (8)
Threshold=E?SUB?SG-M #SUB#(t) Selecctive (8)
Further, the amplitude between the magnitude of the QRS peak signal (I#IQRSI?I?SUB?P#SUB#) and the magnitude of the valley at the first half wave is (I#IQRSI?I?SUB?VP1#SUB#) calculated using equation (9)
Amplitude=|E?SUB?SG-M#SUB#(QRS?SUB?P#SUB#)_E?SUB?SG-M#SUB#(QRS?SUB?VP1#SUB#)| (9)
Detrended Fluctuation Analysis (DFA): Detrended fluctuation analysis (15) is a method for determining the statistical identity of an ECG signal. This approach, in particular, gave information on heartbeat interval time series correlations. Let be the piecewise series of linear fashion fits that results. The fluctuation is determined using the root mean square divergence from the average, as shown in equation (10)
(10)
Finally, the detrending and fluctuation detection process was repeated for a variety of window sizes n, in an ECG signal, and a log-log graph of DFA(n) against n is created. The stationary situations are represented by a straight line on this log-log graph, which exhibits statistical self-affinity expressed as I#IDFAI?I(n)?α(2). This analysis provides the QRS complex signal relationship of a heartbeat signal.
Empirical Orthogonal Function (EOF): EOF (24) is a signal processing method that experimentally identifies the signal’s periodical frequencies and is fully reliant on the data. The EOF approach objectively determines the data’s intrinsic time spans, which are conceived as the distances between sequential corresponding levels. The inherent mode function is a well-behaved function that uses two requirements to provide an explicit specification of the instantaneous amplitude and frequency: (1) There must be a unit difference between the number of local corresponding levels and zerocrossings. (2) In every location, the average envelope defined by local maximums and minimums must be zero. It interacts with fractal-like signals and extracts the global structure. It also facilitates in the investigation of non linear and non stationary signals’ adaptive time-frequency-amplitude space. It disintegrates the preprocessed signal into a residue and a few Intrinsic Mode Functions (IMF) to detect P,T,R peaks.
(11)
Bidirectional RNN- BiLSTM
The suggested model identifies the ECG signal as normal or abnormal by learning parameters in both the forward and backward directions to boost the Bidirectional Long Short-term Memory (BiLSTM) classifier model’s learning capacity. By memorising information for a long time, bidirectional RNN decreases the likelihood of gradient diminishing problems. The features extracted using feature extraction techniques was fed into a Bidirectional LSTM unit, which learns long-term correlations between normal and abnormal ECG signal. BiLSTM [25, 26] encoder, fully linked layer, and prediction layer make up the proposed bidirectional LSTM for ECG signal, three BiLSTM layers and a maxdropout layer make up the encoder unit. (Table/Fig 5) shows the proposed BiLSTM unit.
The target location I#IT(ES,AB)I?I of the predicted signal for the receive input features are depicted in equation (12).
I#IT(ES,AB)=WI?I?SUB?T#SUB#F(t)+b (12)
Where F(t) is the combination of Threshold and Amplitude taken from UDTCWT, DFA(n) taken from detrended fluctuation analysis and EOF(n) taken from EOF analysis. This predicts the early stage and abnormal stage of heart diseases.
Statistical Analysis
The DICARDIA, Physionet ECG, and MIT-BIH databases are used in the research design for early prediction analysis of type-2 diabetic patients’ ECG signals. The datasets were typically named in number order, starting with the database name and ending with the database name. The algorithm is tested on the MATLAB 2021a platform and trained on a PC with an Intel i4 processor and 16GB of RAM.
The proposed work analyses the normal and abnormal patient details using ECG signal. The ECG signal of the Type-2 diabetic patient has been given to the proposed model. The model removes the noise information from the ECG signal by retaining the important signal information. Then the important features are taken out and the classifier model classifies the abnormal and normal signal.
[Table/Fig-6,7] illustrate samples of images from the DICARDIA and MIT-BIH datasets. (Table/Fig 6) displays the ECG waveform of a 51-year-old female diabetes mellitus type 2 patient with the DICARDIA study number 14800 and the record number 662. The train dataset photos of M24,M34, and M36 are downloaded from the MIT-BIH dataset images on the kaggle website.
The input ECG signals from various datasets are preprocessed with a hybrid preprocessing filter that combines the golay and median filters. These filters eliminated several sorts of noise from the ECG data. The features are recovered from the UDTCWT decomposition filter after the noise has been removed. Using thresholding and amplitude values obtained during the third step of decomposition, this determines the peak and valley points of the MIT-BIH dataset image (Table/Fig 8).
The peak and valley points are taken as the first feature set for the classifier. The heart fluctuations points are analysed by detrended fluctuation analysis shown in (Table/Fig 9). The maximum spots are detected in DICARDIA database images through EOF analysis shown in (Table/Fig 10).
The fused feature combinations are given to the BiLSTM classifier model to classify the early stage and abnormal stage patients through ECG signal. (Table/Fig 11) shows the network architecture of BiLSTM classifier model.
Through the bidirectional RNN approach, this model learns from weak learners and classifies them more accurately. The suggested model was trained using 80% of the data and evaluated using 20% of the data. The pareto concept is used to categorise the features. The BiLSTM model employs three distinct blocks with varying hidden layer sizes and dropouts of 0.1 and 0.2. The model learns in 0.24 seconds with the minimum set of features and achieves a higher average accuracy of 97.6%. (Table/Fig 12) shows the comparison results of the proposed BiLSTM classifier model with the state of art techniques. The proposed method achieves the better performance in precision, recall, F1score and accuracy. It attains a gain of 0.40 in accuracy, 2.44 in F1score, 0.433 in recall and 0.64 in precision (27),(28),(29).
The experimental evaluation of the proposed technique (Table/Fig 12) reveals that the automatic BiRNN based early detection and prediction of CVD in Type-2 diabetic patient’s results in better forecast planning for physicians. The noise removal with feature extraction provides a better prediction of CVD in Type-2 patients. It is a direct image processing-based analysis; therefore user intervention is not necessary for training or testing. However, if the images are acquired with an excessive amount of noisy signal, this method might not provide accurate analysis.
Limitation(s)
This proposed model has also been given the false analysis of 2.4% and this is comparatively less than other prediction models. This would be recovered by training more models in future.
Bidirectional RNN classifier model based on hybrid preprocessing with fused features is proposed for early prediction of CVDs from ECG signals taken from type-2 diabetic patients. To reduce noise from the ECG signal received from various datasets, a hybrid unique preprocessing filter is used. The features are then extracted using UDTCWT, DF, and EOF analysis to detect the ECG signals’ maximum, peak, valley points, and variations. Signal-based bidirectional RNN model is used to classify the features. The proposed method is the most effective way for detecting anomalies in ECG signals in both the early and pathological stages.
DOI: 10.7860/JCDR/2022/55951.17154
Date of Submission: Mar 01, 2022
Date of Peer Review: Apr 25, 2022
Date of Acceptance: Sep 17, 2022
Date of Publishing: Nov 01, 2022
AUTHOR DECLARATION:
• Financial or Other Competing Interests: None
• Was Ethics Committee Approval obtained for this study? No
• Was informed consent obtained from the subjects involved in the study? NA
• For any images presented appropriate consent has been obtained from the subjects. NA
PLAGIARISM CHECKING METHODS:
• Plagiarism X-checker: Mar 07, 2022
• Manual Googling: Sep 08, 2022
• iThenticate Software: Sep 15, 2022 (5%)
ETYMOLOGY: Author Origin
- Emerging Sources Citation Index (Web of Science, thomsonreuters)
- Index Copernicus ICV 2017: 134.54
- Academic Search Complete Database
- Directory of Open Access Journals (DOAJ)
- Embase
- EBSCOhost
- Google Scholar
- HINARI Access to Research in Health Programme
- Indian Science Abstracts (ISA)
- Journal seek Database
- Popline (reproductive health literature)
- www.omnimedicalsearch.com