# Interval-Based LDA Algorithm for Electrocardiograms for Individual Verification
## 2 Materials and Methods
### Feature Extraction
#### 2.2.3. Deciding the Optimal Interval Size for Interval-Based Feature Vector  
In Section 2.2.2, we realized that dividing ACPs with a short interval and applying different feature vectors to each ACPlet yields a better identification; however, the interval size should be decided appropriately. The optimal interval size is determined based on the maximum interval that satisfies a mean square error (MSE) criterion between the ACPlets and their linearly fitted lines, such that each ACPlet provides clear angle information.  
Based on the assumption of the optimal interval size \(L\), the reference profile \(\overline{\Phi}(m)\) can be equally divided into \(Q/L\) profiles \(f_{i}(v)\), defined as follows:  
\[\overline{\Phi}(m)=\ \{\ f_{1}(v),f_{2}(v),\cdots,f_{i}(v),\cdots,f_{NI}(v)\ \}\mbox{ for a given }L \tag{4}\]  
where \(i\left(=\frac{Q}{L}\right)\) is the number of intervals and \(0\leq v\leq L-1\).  
Here, let define \(\Phi(m)\) as the set of \(g_{i}(v)\) that is the \(f_{i}(v)\) linearly fitted, as follows:  
\[\Phi(m)=\ \{\ g_{1}(v),g_{2}(v),\cdots,g_{i}(v),\cdots,g_{NI}(v)\ \} \tag{5}\]  
where \(0\leq v\leq L-1\).  
Thus, the optimal interval \(L\) is the maximum length that satisfies the following MSE (\(\zeta\)) criterion between the two profiles \(\overline{\Phi}(m)\) and \(\hat{\Phi}(m)\).  
\[L=\max_{l}\left[\ \sum_{i=1}^{NI}\sum_{v=0}^{l-1}\ (\ f_{i}(v)-g_{i}(v)\ )^{2}\leq \varepsilon\ \right]\mbox{ for }2\leq l\leq\frac{Q}{2} \tag{6}\]  
where \(\varepsilon\) is the minimum tolerance of the MSE and NI (=\(Q/L\)) is the number of intervals. The symbol represented in the above process is illustrated in Figure 6.  
Figure 7 shows typical examples of the MSE \(\zeta\) and identification accuracy \(\eta\) as a function of NI (Number of Interval). In Figure 7, MSE \(\zeta\) represents the ratio based on the assumption that MSE \(\zeta\) is 100% when NI is set to 2, where (a) represents the minimum tolerance \(\varepsilon\), which is experimentally set to 20%; (b) is the NI value satisfying (a), which corresponds to \(Q/L\); and (c) is the identification accuracy when the NI value corresponds to (b).  
The Figure 7 shows that the MSE \(\zeta\) decreases as NI increases, where a higher NI is proportional to identification accuracy \(\eta\) but requires more computations for the verification process. Accordingly, there is a trade-off between the NI and computational cost. We also observed that the IDA improves  
Figure 6: Symbol descriptions: (**a**) \(N\) is the update cycle of the verification process; (**b**) \(Q\) is the time-shifting size of the ACP process; (**c**) L is the size of an interval and the maximum length that satisfies the MSE (\(\zeta\)) criterion.  
with increasing NI; however, the improvement is not significant. For instance, as the NI increases from Q/L to 50, only an improvement of less than 0.2% is obtained. In conclusion, the performance of the proposed algorithm is not highly sensitive to the NI as long as it is greater than \(Q/L\). Finally, the NI is set to \(Q/L\) when MSE \(\zeta\) corresponds to \(\varepsilon\), since there is no big difference in the final performance as long as the NI is greater than \(Q/L\).