## 4 Performance Evaluation Results and Discussion
### Experiments and Results
#### 4.2.4 Result of Experiment 4  
The four datasets, except for TwoLead, are aimed at diagnosing heart disease. Therefore, as shown in Table 7, the shallow domain knowledge can be derived from the sub-pattern that is the criteria for diagnosis of each heart disease. AF-D1 and AF-D2 are datasets for the diagnosis of atrial fibrillation. Atrial fibrillation can be diagnosed based on irregular heartrate. Since the QRS complex is observed at every heartbeat interval, the appearance pattern of the QRS complex within a certain range can be reflected in the shallow domain knowledge. When sample patterns were extracted and visualized for each class, it was confirmed that the appearance frequency of the QRS complex per unit time was different for each class. In order to inject the frequency of appearance of the QRS complex per unit time into shallow domain knowledge, there may be several possible methods, such as introducing an RNN. However, techniques for injecting shallow domain knowledge in a more complex form, based on an ensemble with other types of neural networks, is to be further studied in the future. Instead, in order to reflect this shallow domain knowledge up to the present study, first, the kernel size of the Base-CNN was set as the QRS complex length, and the middle part of the pattern was set as the shallow domain knowledge range. This is because data loss may occur in the process of cutting and patterning stream data in the front and rear portions of the pattern. Additionally, ECG200 is a dataset for the diagnosis of ischemia, and the characteristic T wave is the main diagnostic criterion for ischemia. Therefore, the range of the T wave was set as the shallow domain knowledge. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**No.**} & \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{**Pattern Length**} & \multirow{2}{*}{**Target Disease**} & **Sub-Pattern as** & \multicolumn{2}{c}{**Shallow Domain Knowledge**} \\  & & & & **Criteria** & **Start Index** & **End Index** \\ \hline
1 & AF-D1 & 640 & Atrial Fibrillation & QRS & 70 & 300 \\ \hline
2 & AF-D2 & 640 & Atrial Fibrillation & QRS & 70 & 300 \\ \hline
3 & ECG200 & 96 & ischemia & T & 10 & 55 \\ \hline
4 & ECG5000 & 140 & Congestive Heart Failure & P & 100 & 135 \\ \hline
5 & TwoLead & 82 & Non-disease & Differences & 0 & 70 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Description of deriving optimized shallow domain knowledge for each dataset. ECG5000 is a dataset for diagnosis of congestive heart failure. At this time, the main diagnostic criterion is R-on-T, which is a phenomenon in which the R wave appears too early and rises above the T wave of the previous ECG pattern. That is, when R-on-T occurs, an abnormality also occurs in the P wave. In addition, abnormal findings of the P wave are diagnostic criteria for various heart diseases. Therefore, the shallow domain knowledge for ECG5000 was set to the range of the P wave. Since TwoLead is not a dataset for diagnosing heart disease, shallow domain knowledge could not be derived from specific medical facts. In this paper, Experiment 5 tried a method applying the proposed SDK-Injection method to this general ECG classification task, and based on this, TwoLead's shallow domain knowledge was derived, as shown in Table 7.  
Table 8 compares the performance improvement effect of the injected optimized shallow domain knowledge when the SDK-Injection method is applied to each dataset, as shown in Table 7. Additionally, from the metrics in Table 8, accuracy is visualized in Figure 12a. That is, as seen in Figure 12, the accuracy and training time were compared when the optimized shallow domain knowledge was set for the sub-pattern range, derived based on medical facts, as above, and when the sub-pattern range was set to 0 and the full length of the pattern. As a result, the highest accuracy, precision, sensitivity, specificity, and f1-score were achieved when the optimized shallow domain knowledge in Table 7 was set for all datasets.