## 2 Method
### Pre-Processing  
A classification system which is composed of pre-processing, feature extraction and classification, is constructed based on the Electrocardiogram-SPP-Net, as shown in Figure 3. In the pre-processing stage, 46 records of the MIT-BIH arrhythmia database containing 100,300 heartbeats were selected. In this database, the ECG first marked the category label of each heartbeat. Then, the ECG signal was cut off into segments according to the label [28]. The label was located at the R peak, which was denoted as R\({}_{1}\), R\({}_{2}\), and R\({}_{3}\) for the three peaks of an ECG signal (Figure 4). The segments, which are segment 1 and segment 2 in Figure 4, were the ECG signals between the two peaks. Then, each segment was broken through its middle section. The anterior of a segment was connected to the posterior of a segment that emerged earlier (Figure 4). The resultant heartbeat contained all the information from the P-wave to the T-wave. Then, each heartbeat was normalized into the range of values between 0 and 1 before sending the preprocessed heartbeat signal into the ECG-SPP-net. Such a large population of heartbeats were classified into six categories, which were normal beat (N), paced beat (/), atrial premature beat (A), premature ventricular contraction (V), left ventricular bundle branch block (L), and right bundle branch block (R). Due to the proportion of the normal heartbeats accounts 73.3% (\(n=73\),542) of the total samples of the heartbeats, 6000 normal heartbeats were randomly chosen for the classification. The sample set that contains the six kinds of heartbeats is shown in Table 2. Moreover, 70% of heartbeats were also selected from the sample set as the training dataset of the classifier, and the other 30% of beats were used as the test pattern for performance evaluation.  
The WT was utilized as the de-noising method by using a db5 decomposition [25] in three scales with [PERSON]'s unbiased likelihood threshold estimator. Subsequently, the baseline drift and noise were moved. Figure 5 displays a comparison of ECG signals between the original one and the de-noised one and such a sample set was taken from the MIT/BIH arrhythmia database. Before sending the pre-processed data into the CNN network, the normalization for all the heartbeat signals was conducted first. The heartbeat signals were bandpass filtered at 0.1-100 Hz and digitized at 360 Hz. The function mapminmax in MATLAB was employed as the method for the amplitude normalization, which puts the amplitude of the sampling point into the interval of [0,1]. Then, such normalized data was fed into the CNN network.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Layers** & **Type** & \
\begin{tabular}{c} **No. of Neurons** \\ **(Output Layers)** \\ \end{tabular} &
\begin{tabular}{c} **Kernel Size for Each Output** \\ **Feature Map** \\ \end{tabular} & **Stride** \\ \hline
1 & Convolution\_1 & \(N_{corn,1}\times 6\) & 5 & 1 \\
2 & Max pooling & \(N_{corn,1}/2\times 6\) & 2 & 1 \\
3 & Convolution\_2 & \(N_{corn,1}\times 12\) & 5 & 1 \\
4 & SPP & \(7\times 12\) & \([N_{corn,2}/2,N_{corn,2}/4,N_{corn,2}/8]\) & \([N_{corn,2}/2,N_{corn,2}/4,N_{corn,2}/8]\) \\
5 & Fully connected & 84 & – & – \\ \hline \hline \end{tabular}
\end{table}
Table 1: The detailed overview of ECG-SPP-net structure.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Class** & **N** & / & **A** & **V** & **L** & **R** & **Total** \\ \hline Beats & 6000 & 3616 & 2480 & 6676 & 8069 & 5916 & 32,757 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Number of beats in the sample set.  
Figure 4: The segmentation of the ECG signal into a heartbeat. Three peaks of the ECG signal are represented as R\({}_{1}\), R\({}_{2}\), and R\({}_{3}\). The peak to peak of the signal was regarded as one segment. The anterior of a segment was connected to the posterior of a segment which emerged earlier. The grey area was a complete heartbeat signal.  
Figure 3: Classification system.