# Data Independent Acquisition Based Bi-Directional Deep Networks for Biometric ECG Authentication
## 4 Experimental Results and Discussion
### System Evaluation
The optimal input sequence length or the number of successive heartbeats for the experiments are selected according to the previous experiments and after various lengths of trails by conducting with widely used lengths; single heartbeat, three \begin{table}
\begin{tabular}{c c c} \hline \hline
**Predicted Actual** & **Positives (1)** & **Negatives (0)** \\ \hline
**Positives (1)** & TP & FP \\
**Negatives (0)** & FN & TN \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Confusion matrix for evaluation classification accuracy. heartbeats, six heartbeats and nine heartbeats. Since there is a lower accuracy rate in single heartbeat compared to the rest of the groups, and there is no significant higher accuracy rate in six-heartbeat group compared to three-heartbeat group, we selected the number of successive heartbeats to three and nine for further experiments. The entropy loss plot is shown in Figure 9, and the proposed multi-resolution bidirectional LSTM outperforms the others as the training process reaches 150 epochs over the ECG-ID dataset. Thus, our proposed bi-directional LSTM-based model was chosen for further experiments that examined our new data-independent acquisition-based method compared to other recent studies. To evaluate the performance results for classification, we examined the networks based on four statistical evaluation metrics: accuracy (_Acc_), sensitivity (_Sen_), specificity (_Spc_), and positive predictivity (_Ppr_). \[Acc=\frac{TP+TN}{TP+FP+FN+TN} \tag{25}\]  
\[Sen=\frac{TP}{TP+FN} \tag{26}\] \begin{table}
\begin{tabular}{l c c} \hline \hline
**Type of Model** & **Input Sequence Length (Number of Heartbeats)** & **Accuracy** \\ \hline Proposed 1D-CNN & 3 & 0.925 \\  & 9 & 0.911 \\ \hline RNN + LSTM & 3 & 0.965 \\  & 9 & 0.971 \\ \hline RNN + GRU & 3 & 0.952 \\  & 9 & 0.978 \\ \hline Proposed BLSTM & 3 & 0.982 \\  & 9 & 0.993 \\ \hline Proposed BGRU & 3 & 0.921 \\  & 9 & 0.983 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance of classification accuracy for selected input sequence length over conventional and proposed models. Figure 9: Comparison of cross-entropy loss per epoch over ECG-ID dataset over conventional and proposed models. \[Spe=\frac{TN}{TN+FP} \tag{27}\]  
\[Ppr=\frac{TP}{TP+FP} \tag{28}\]  
The terms \(TP\), \(TN\), \(FP\), and \(FN\) in the preceding equations denote true positive, true negative, false positive, and false negative, respectively. \(F1\) and Fowlkes-Mallows index (\(FM\)) scores are also computed using Sen and Ppr as follows:  
\[F1=\frac{2}{\frac{1}{\mathit{sen}+\frac{1}{\mathit{PP}}}} \tag{29}\]  
\[FM=\sqrt{\mathit{Sen}\times Ppr} \tag{30}\]  
We compared the proposed method with previous RNN-based networks for six ECG datasets according to the preceding evaluation metrics. Our proposed multi-resolution bidirectional LSTM outperformed the others in terms of \(F1\) and \(FM\) scores for the ECG-ID dataset. The accuracy of the proposed algorithm for both datasets nearly matches that of [PERSON] et al. [24], which used a bidirectional LSTM network for a 12-lead ECG signal. It should be noted that the \(F1\) score is a more significant metric than the accuracy score. [PERSON] et al. [5] used a multi-resolution parallel network based on CNN, deploying multiple versions of wavelets to improve the context representation of the signal for generalization purposes. For the ECG-ID dataset, the accuracy for all techniques was quite similar, and the proposed method outperformed the other methods for the \(F1\) score, which achieved 98.84%. For the MIT-BIH ECG dataset, [PERSON] et al. [40] achieved a higher accuracy compared to other techniques [24; 40; 41]; however, our proposed method significantly outperformed theirs. Moreover, they still need to first identify the heartbeat, which is intensive in terms of the algorithm engineering process, compared to our random signal segmentation. In the STAFF-III dataset, the proposed method scored a high accuracy of 97%, and achieved higher \(F1\) and \(FM\) scores.