# ECG-Signal Multi-Classification Model Based on Squeeze-and-Excitation Residual Neural Networks
## 3 Results  
Under the above training setting, we investigated the SE-ResNet and ResNet with 18/34/50/101/152 layers for seven-class classification. The test set was evaluated using the parameters in the validation set that exhibited the best performance; for the model evaluation, the accuracy and F1 score were used. The F1 score is the harmonic mean of the precision and recall. It is a more efficient criterion for model evaluation than accuracy, if the ratio between the data sectors is very different, e.g., the ECG signal dataset we cover in this study. Tables 1 and 2 summarize the performance of the seven-class classification models on the testing data using the SE-ResNet and ResNet, respectively. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{
\begin{tabular}{c} **Layers in** \\ **Model** \\ \end{tabular} } & \multirow{2}{*}{**Accuracy**} & \multicolumn{8}{c}{**F1 Score**} \\ \cline{3-10}  & & & **Total** & **Normal** & **AF** & **AFL** & **PVC** & **SB** & **ST** & **FAB** \\ \hline
**18** & 96.56\% & 96.57\% & 99.39\% & 99.04\% & 92.11\% & 88.67\% & 91.35\% & 92.31\% & 89.59\% \\
**34** & 96.50\% & 96.48\% & 99.58\% & 98.49\% & 88.95\% & 90.60\% & 91.37\% & 94.75\% & 89.66\% \\
**50** & 95.78\% & 95.78\% & 99.16\% & 97.97\% & 87.55\% & 89.04\% & 91.06\% & 93.51\% & 88.15\% \\
**101** & 96.68\% & 96.67\% & 99.39\% & 98.72\% & 90.98\% & 90.38\% & 92.20\% & 93.84\% & 90.35\% \\
**152** & 97.05\% & 97.05\% & 99.84\% & 99.12\% & 92.45\% & 90.57\% & 91.27\% & 94.66\% & 90.19\% \\ \hline \hline \end{tabular}  
* Total: Frequency weighted average of F1 scores; Normal: Normal Sinus Rhythms; AF: Atrial Fibrillation; AFL: Atrial Flutter; PVC: Premature Ventricular Contraction; SB: Sinus Bradycardia; ST: Sinus Tachycardia; FAB: First degree atrioventricular block.  
\end{table} 
Table 1: Seven-class classification results for our model (SE-ResNet). The SE-ResNet had better classification performance than the ResNet, for all layers (18/34/50/101/152). Our model also had a higher F1 score than the baseline Resnet model for all sectors (Normal/AF/AFL/PVC/SB/ST/FAB). The best result for the seven-class classification model using the SE-ResNet was the 152-layer model with a 97.05% F1 score (Table 1). The best result for the seven-class classification model using the ResNet was the 152-layer model with a 95.65% F1 score (Table 2). The F1 scores of the best SE-ResNet models for the seven-class ECG signal classifications were +1.40% (difference between 97.05% for the 152-layer SE-ResNet and 95.65% for the 152-layer ResNet) higher than the baseline model. When the data were analyzed, the point to note about Table 1 is that the F1 scores of our model for AFL, PVC, SB and FAB were relatively lower than the F1 scores for Normal, AF and ST. Furthermore, to analyze the results in more detail, we selected the 152-layer SE-ResNet models with the highest F1 scores for the seven-class classifications. We calculated the confusion matrices of these models, and they are graphically shown in Figure 2, which confirms the advantages and disadvantages of our models. As shown in Figure 2, our model shows good overall performance for most sectors; however, it had difficulty distinguishing between FAB and SB, AF and AFL, and FAB and PVC, which explains the lower F1 scores for AFL, PVC, SB and FAB. In addition, we compared the inference time of the ResNet and SE-ResNet for the test set in Table 3. When the number of layers is 18 or 34, there is no significant difference in inference times between the ResNet and SE-ResNet, however, when the number of layers is 50 or 101 or 152, the inference time of the ResNet is less than the inference time of the SE-ResNet with the same number of layers. Nevertheless, even the 152-layer SE-ResNet model does not take much time for processing the test set and shows that it has practical application. When considering both the inference time and performance, an 18 or 34-layer SE-ResNet may also be considered.