# Data Independent Acquisition Based Bi-Directional Deep Networks for Biometric ECG Authentication
## 4 Experimental Results and Discussion
### System Evaluation  
For our experiment, the ECG-ID (ECG-ID) and MIT-BIH ECG, STAFF III database (STAFF-III), and Long Term AF Database (LT-AF) data were collected from PhysioNet. The ECG-ID dataset includes 310 ECG recordings digitized at 500 Hz, obtained from 90 subjects (10,000 samples), while the MIT-BIH ECG dataset contains 168 short recordings for 47 subjects, set to pose a variety of challenges for ECG compressors, especially for compression methods. The STAFF III database was acquired during 1995-1996 and contains standard 12-lead ECG recordings from 108 patients. LT-AF dataset consists of ECG recordings of 84 subjects with paroxysmal or sustained atrial fibrillation (AF), and digitized at 128 Hz with durations which vary from 24 to 25 hours. Moreover, two more datasets, namely AFDB with 20 subjects and AHA datasets with two subjects (without QRS complex), were examined for our extended data-independent acquisition-based approach. These datasets may be acquired by different lead configurations. Moreover, the datasets were collected from healthy or quasi-healthy participants, and also include severe heart diseases such as ST depression or elevation, arrhythmia, atrial fibrillation and malignant ventricular ectopy. However, the datasets were not acquired with the same sampling rate, all the ECG recordings were resampled to 360 Hz to fairly illustrate the performance. To train the RNN-based networks, the training dataset was divided into batches of several heartbeats for each dataset. The weights for each batch were updated upon completion. The input data was forward and backward propagated throughout the network, and the error cost was calculated by back-propagating the unfolded network in time. We adopted a method called backpropagation through time (BPTT) with the Adam optimization method employed in our experiment, with the learning rate set to 0.001. The batch size was set as 150, which yielded higher performance for all the methods, namely, traditional RNN, RNN with LSTM, and RNN with GRU. The epoch size was chosen as 150 to balance network over-fitting issues. Furthermore, a dropout [39] of 0.4 outputs of the first layer, and the last layer inputs were utilized to overcome the overfitting problem. For the evaluation, total of 5066 segmented windows from all dataset from all dataset were separated for training and test sets. To investigate the accuracy of the classification rate, the proposed models were evaluated based on classification accuracy, which can be determined using the confusion matrix. It is one of the most common intuitive metrics used for evaluating the performance and accuracy of machine learning models commonly used for classification problems, as shown in Table 2.  
The associated terms are related to a given confusion matrix can be specified as true positives (TP), True negatives (TN), False positives (FP), and True negatives (TN). When the output correctly classifies the data point as the ground truth, it is considered to be a TP. True negatives (TN) are the cases when the output class of the given data point is predicted correctly as negative for the given class. False positives (FP) are the cases when the model incorrectly predicted the corresponding class as positive. False negatives (FN) are the cases when the ground truth should be positive, but the model's prediction is negative. As a result of the accuracy in classification tasks if the correct predictions made by the model over all predictions, the correct predictions are known as true positive (TP) and true negative (TN) are divided by all predictions made by the model, calculated in (24). \[Accuracy=\frac{TP+TN}{TP+FP+FN+TN} \tag{24}\]  
According to Table 3, the reported overall classification accuracy outperforms all the previous studies for all datasets. Before we investigated the performance of our proposed method, we studied it in comparison to conventional RNN-based methods, namely, traditional RNN, RNN with LSTM gates, and RNN with GRU gates over four datasets with QRS complex.