## 2 Related Work
### Automatic ECG Diagnosis and ECG Pattern Classification  
Most ECG signals measured from sensors contain noise. Since such noise can distort the characteristics, most automatic ECG diagnoses perform preprocessing to remove the noise. For preprocessing, smoothing is mainly used. A commonly used ECG smoothing technique in recent studies is FIR [18]. However, in this study the Savitzky-Golay filter [19; 20], a curve fitting-based smoothing technique that has been traditionally used for ECG preprocessing, was used. Classification of ECG patterns on the status of various heart diseases is a typical nonlinear problem. Therefore, traditional data mining-based, automatic ECG diagnosis techniques require ECG segmentation-based feature extraction to classify ECG patterns for various heart disease states [1; 2; 3; 4]. ECG segmentation is a technique for recognizing major sub-patterns that reflect the medical characteristics of ECG patterns, such as P and Q waves, QRS complex, RR interval, and ST segment. Such ECG segmentation was researched using data mining in [1; 2]. Recently, signal processing-based ECG segmentation methods, such as those presented in [3; 4], are also being studied. Data mining based automatic ECG analysis techniques first perform ECG segmentation, as in [1; 2; 3; 4], and then develop a diagnosis algorithm for each heart disease by characterizing the recognized sub-patterns [5; 6]. A system architecture for automatic ECG diagnosis is proposed in [21], which classifies ECG data using the decision tree and multilayer perceptron (MLP) after performing preprocessing and data mining-based feature extraction. Although these data mining-based automatic ECG diagnosis techniques are explainable, they are not suitable for real-time analysis in a wearable-based environment. Recently, deep learning-based automatic ECG diagnosis techniques are being actively studied. These deep learning-based automatic ECG diagnosis techniques are being studied preferentially for important heart diseases related to emergency situations, such as atrial fibrillation and myocardial infarction [7; 8; 9; 10; 11; 12]. In addition, they show high performance compared with traditional data mining-based methods. Most of the deep learning-based automatic ECG diagnosis techniques [13; 14; 15] studied so far diagnose each heart disease by applying a neural network to the results of conventional ECG segmentation, such as in [1; 2; 3; 4]. Ref. [13] diagnoses arrhythmia by analyzing with CNN applied to sub-patterns that were obtained by applying ECG segmentation to the result of wavelet transform pre-processing. Refs. [14; 15] also extract features through existing ECG segmentation and then analyze them based on CNN. Ref. [22] proposes an automatic ECG diagnosis system which analyzes ECG data collected from a mobile environment after performing preprocessing and feature extraction. Especially, [22] uses sliding segmentation instead of the existingfixed segmentation to extract features and proposes an advanced neural network based on a residual network using a large kernel for the computational efficiency during the model training phase. However, although this traditional ECG segmentation plays a very important role, it may be considered unsuitable for real-time analysis because of its complex steps. Therefore, studies on deep learning-based ECG segmentation techniques, such as [23; 24], are being attempted, but additional research is needed due to the inexplicability of deep learning. Deep learning-based automatic ECG diagnosis techniques use CNN in various ways to classify ECG patterns. As in [7; 8], ECG analysis is performed by ensembles of various types of neural networks and CNNs. Here, CNN is introduced to extract features for pattern classification and RNN is introduced to reflect periodicity, such as heartrate. Ref. [9] also extracts features by using the CNN instead of the segmentation-based, feature extraction method, and passes them to the LSTM to analyze atrial fibrillation.