• No results found

Input:

Y(x) //The original ECG signal

locR //Location of R

qrsT //QRS distance threshold pT //P distance threshold tT //T distance threshold Output:

locP //Location of the P locQ //Location of the Q locS //Location of the S locT //Location of the T ampP //Amplitude of the P ampQ //Amplitude of the Q ampS //Amplitude of the S ampT //Amplitude of the T

Begin

//Search the left-hand side of the R location for the minimum value within the half QRS distance threshold range

locQ = location of minimum in Y(locR - Round(qrsT/2): locR);

//Search the right-hand side of the R location for the minimum value within the half QRS distance threshold range

locS = location of minimum in Y(locR: locR + Round(qrsT/2));

//Search the left-hand side of the Q location for the maximum value within the P distance threshold range

//Search the right-hand side of the S location for the maximum value within the T distance threshold range

locT = location of maximum in Y(locS: tT); ampQ = Y(locQ); ampS = Y(locS); ampP = Y(locP); ampT = Y(locT); End

Experimental Results

In this section, the conducted experiments are described and the results are shown. The feature extraction algorithms determine the locations of P, Q, R, S and T waves, however, the databases used in the study only provide locations of QRS complex. This makes it hard to access the feature extraction algorithms without manually labelled boundaries. As the acquired P, Q, R, S and T wave locations from feature extraction algorithms are used for abnormality detection, the classification results are provided to indicate the efficiency of the extracted features. The results from the standalone algorithm (i.e. the positions of P, Q, R, S and T locations of each heartbeat) are used in the next chapter for further processing. In this chapter, only the results calculated using assisted feature extraction algorithm are used. The R values used are extracted by the MMD algorithm.

In this study, an artificial neural network (ANN) and ensemble classifiers are employed for heart abnormality detection based on the features extracted by assisted feature extraction method from single lead raw ECG signals. Neural network is employed in this research because of its generalization ability and robustness for dealing with any unseen test data. Especially, the NN has a great capability of adjusting itself to large variations of input samples for classification which fits the requirement of this research very well. A large number of data samples from online ECG databases are also used for the training of NN. Afterwards, the trained network can be used on any new input samples for abnormality detection.

Databases used

Raw ECG data samples used from signals provided by three databases from PhysioNet (Goldberger et al. 2000) databank for evaluation. These databases are, European ST-T Database, QT Database, MIT-BIH Arrhythmia Database. All of the databases mentioned above are freely available online. A more detailed introduction of these databases is provided in Section 5.1.3.1.

The training and testing of our system is described in the following. Only one channel of ECG data is used from the databases discussed in this section to create training and testing data. For

the large signals only first one million of the data sample is used. If the signal is small, the whole signal is processed. The heartbeats are categorized into two types: ‘Normal’ and ‘Abnormal’ regardless of abnormality types at this stage for this research. Table 8 shows the number of ‘Normal’ and ‘Abnormal’ heartbeats taken from each database for training and testing purposes. The test database contains only a subset of beats extracted by our proposed algorithm from PhysioNet databases.

Table 8 : The number of normal and abnormal ECG beats in the employed databases.

Database No. of normal beats No. of abnormal beats

European ST-T 133846 10009

QT 40271 6051

MIT-BIH arrhythmia 18783 7396

Total 202909 23545

Assessment method

The classification outcomes are referred to as TP, FN, TN, and N2. TP represents the total

number of abnormal ECG beats that are truly identified as abnormal ECG beats, while FN represents the total number of abnormal ECG beats that are falsely identified as normal ECG beats. TN represents the total number of normal ECG beats that are correctly identified as being normal, and FP represents the total number of normal ECG beats that are falsely identified as abnormal. True positive rate (TPR), false positive rate (FPR) and overall accuracy (OA) are used as measures in this research for the evaluation of the heartbeat abnormality detection. Equations (5.19) and (5.20) show the calculation of TPR and FPR while overall accuracy is calculated using Equation (5.22).

% 100       FN FP TP TN TP TN OA (5.22) Assessment Methods

Two simple assessment methods are used for checking accuracy on abnormality (heartbeat abnormality) detection. Neural network is selected as first method and Adaboost M1 with decision trees as the second. Both the methods are discussed further in the following.

Abnormal beat detection based on ANN

Artificial neural network is a popular computing model mainly used for solving classification problems. In the experiments, an ANN was employed with 11 inputs, 5 hidden layers and two output classes. Features obtained from the proposed feature extraction algorithm along with

annotations from database are used to train the network by Backpropagation algorithm. After the training is done, the network is capable of classifying normal or abnormal heartbeats when those sixteen extracted features (discussed further in Chapter 6) are used as inputs of the network. The evaluation results for NN are discussed in the next section.

Abnormal beat detection based on ensemble classifier

An ensemble classifier combines a set of trained weak learner models to form a strong classifier. It produces ensemble results for any test data by aggregating predictions from its weak learners. In the experiments, decision tree (DT) was taken as the base weak classifier along with AdaBoost for the construction of the ensemble classifier. The outputs of the DT classifiers are combined into a weighted sum which represents the final output of the boosted classifier. Adaptive boosting is built in a way that subsequent weak learners are tweaked in favour of those instances which are misclassified by the previous classifiers.

Experimental Results

In the experiments, 60% heartbeats are taken randomly for training of neural network and ensemble classifier. The remaining 40% are used for testing purpose. Table 9 shows the evaluation results for the Artificial Neural Network and the ensemble classifier. True positive and false positive rates vary for different databases. The false positive rate is very low while using ensemble classifier, however, the true positive rate is almost same for both the classifiers. Overall, the ensemble classifier shows slightly better performance than neural network classifier as shown in Table 9.

Table 9 : Detection results for normal and abnormal ECG beats for the testing databases.

Test databases Artificial neural network classifier Ensemble classifier

TPR FPR OA TPR FPR OA European ST-T 99.3 0.24 99.7 97.1 0.15 99.7 QT 95.2 0.53 99.0 96.0 0.42 98.9 MIT-BIH Arrhythmia 94.5 0.94 97.5 97.7 0.29 99.6 Average 96.33 0.57 98.73 96.93 0.29 99.40

Conclusion

In this chapter, a novel method, i.e. the MMD algorithm for QRS detection from single lead (mostly Lead II) ECG signals is proposed. It combines baseline correction, Max-Min difference curve generation, dynamic threshold computation, QRS detection and error correction. The main contribution of the proposed MMD algorithm focuses on building a lightweight real-time

QRS detection scheme without compromising detection accuracy. The proposed approach shows great efficiency in dealing with QRS detection from diverse cross-domain ECG signals with efficient computational complexity. Evaluated with five well-known databases, the proposed MMD algorithm achieves impressive performances in comparison to related research for R-peak detection using both normal and abnormal ECG signals. Furthermore, integrated with feature extraction and a neural network classifier, the proposed MMD algorithm has also been further extended for abnormal/normal heartbeat detection. The empirical results indicate the efficiency and superiority of the proposed algorithm to aid abnormality detection. However, it shows performance degradation when dealing with noisy signals, especially with high amplitude spikes, which motivates future directions for development.

Two simple feature extraction algorithms are also proposed in this chapter. The assisted method (as discussed in Section 5.2) is used for evaluation which uses R values obtained by MMD algorithm. On the other hand, the less accurate standalone P, Q, R, S and T detection method is used in the following chapter to show how performance (in terms of accuracy) can be improved using feature enhancement. After using the feature extraction method, the results are saved in the database for further feature generation or enhancement which will be elaborated in detail in the following chapter. The MMD algorithm was published in “Computer Methods and Programs in Biomedicine” (Pandit et al. 2017) and some of the content were also presented in “SKIMA 2014” (Pandit et al. 2014).

Feature Enhancement

Feature enhancement is an optional part of ECG processing. The enhancement methods are generally integrated with the corresponding extraction algorithm rather than reporting separately. In this chapter, it is illustrated that a simple feature enhancement scheme can be helpful in improving overall accuracy of abnormality detection in heartbeats.

Previously, the proposed R-peak detection algorithm along with P, Q, S, T extraction algorithms obtains the locations of P, Q, R, S, and T waves. In this study, two experiments are conducted, the first experiments using eleven constructed features (which are similar to standard medical features) and the second experiment using sixteen features (previously used eleven features and added enhanced/generated features). Both set of features are generated from the same initial information (raw ECG signal and locations of P, Q, R, S, T waves). The goal of this experiment is to demonstrate how performance eventually differs upon using different sets of generated features.

Features

Features in ECG signal contains information (meaningful data) that can be used in classification stage for abnormality detection. Standard medical features (containing medically valuable information) are explained in Feature Extraction section of Chapter 2. Most of the feature extraction algorithms intend to find the locations of P, Q, R, S, T waves; then, recalculate the standard medical features. Sometimes it is also infeasible to calculate boundary

of each wave as they seem to overlap each other. In the next section, commonly used features and reconstructed features used in this research are discussed.

Related documents