## 4 Performance Evaluation Results and Discussion  
### Dataset and Environment  
The proposed SDK-Injection method, Base-CNN, and all comparison methods in the experiment were all developed based on Keras 2.2.4 with Tensorflow 1.14.0 as a backend, and were trained using NVIDIA GeForce GTX 965M GPU. A total of five datasets, as shown in Table 1, were used for model training and testing. These data are all from the UEA and UCR Time Series Classification Repository [28] and the datasets created from data of PhysioNet [29]. AF-D1, AF-D2, and TwoLead have very small train datasets. For AF-D1, AF-D2, and ECG200, the ratio of training dataset size to test dataset size was 1:1. On the other hand, in ECG5000 and TwoLead, the ratio of the training dataset size to the test dataset size was 1:9 and 1:50, respectively.  
Among them, there are a total of four datasets for diagnosing heart disease--AF-D1, AF-D2, ECG200, and ECG5000--and through these, three heart diseases can be diagnosed: atrial fibrillation, ischemia, and congestive heart failure. AF-D1 and AF-D2 are multivariate datasets for the diagnosis of atrial fibrillation. In this paper, the proposed SDK-Injection method was applied by using AF-D1 and AF-D2 as univariate inputs. For comparison, AF-D1 and AF-D2 were composed as multivariate inputs and were analyzed based on the Base-CNN. For the four datasets related to the diagnosis of heart disease, shallow domain knowledge can be derived from the diagnostic criteria of each heart disease. Meanwhile, TwoLead is a dataset for general ECG classification not related to heart disease diagnosis. Therefore, there are no medical diagnostic criteria that can be used as shallow domain knowledge.  
Class Ratio (Train) and Class Ratio (Test) in Table 1 are the distribution ratios between class labels for the training and test datasets of each dataset. For example, in AF-D1, the ratio of the three classes is 1:1:1 for a training dataset consisting of 15 patterns, so each class is uniformly distributed with 5 patterns. In ECG5000, the ratio of 5 classes is 119.41:72.27:3.91:7.95:1 for the test dataset consisting of 4500 patterns, so each class is non-uniformly distributed with 2627, 1590, 86, 175, and 22 patterns, respectively. In this paper, the degree of imbalance in the class distribution for each dataset is quantified by Equation (1), and this result is shown in Table 1 under \"Standard Deviation (Class Ratio)\".  
\[\sigma=\frac{\sqrt{\frac{\sum_{i=1}^{n}\left(R_{Train}-\overline{R}_{Train} \right)^{2}}{n}+\sqrt{\frac{\sum_{i=1}^{n}\left(R_{Test}-\overline{R}_{Test} \right)^{2}}{n}}}}{2} \tag{1}\]  
\(R_{Train}\) and \(R_{Test}\) are class distribution ratio vectors of the training and test datasets in each of the datasets. That is, for each dataset, \(R_{Train}\) is composed of the Class Ratio (Train) value in Table 1, and \(R_{Test}\) is composed of the Class Ratio (Test) value in Table 1. \(n\) is the number of classes in each dataset. As shown in Equation (1), \(\sigma\) is the average of the standard deviation of \(R_{Train}\) and the standard deviation of \(R_{Test}\), and quantifies the class imbalance of the dataset. That is, as the Standard Deviation (Class Ratio) value of Table 1 is closer to 0 it is a balanced dataset with an even class distribution, and as this value increases it is an imbalanced dataset in which classes are unevenly distributed. From this, it can be seen that AF-D1, AF-D2, and TwoLead are balanced datasets, and ECG200 and ECG5000 are imbalanced datasets. In addition, it can be seen that the class distribution of ECG5000 is more uneven than ECG200.