## 2 Materials and Methods
### Methods
#### 2.2.4 Experiment Scenario  
Figure 7 illustrates a method for evaluating the effect of both DWBF and DL on detecting AF. Both feature extraction and classification in the scenario implement WCI statistics and SVM, respectively. As shown in Figure 7, the first step in the method is the development of training and testing data, as described in Section 2.1.1. There are 41 ECG data records, consisting of 23 AF data records and 18 normal data records. For the 23 AF data records, there are 264 AF events. Meanwhile, the same normal number of events is obtained from the 18 NSRDB data records. The total ECG data for training and testing is 528 data records. Then, the noise of the ECG data is filtered using the hard-thresholding technique [20]. The next step is to choose a combination of both the Daubechies (DB) function and the decomposition level (DL)--DB\({}_{i}\)DL\({}_{j}\); \(i\) and \(j\) refer to the order of the Daubechies function and the level of decomposition. The parameters DB\({}_{i}\)DL\({}_{j}\) are then applied for extracting both AF and normal features from 528 ECG data records. There are 528 \(\times\) 4 or 2.112 feature datasets due to each ECG data record producing 4 features, i.e., max, min, mean, and stdev. The feature datasets are then classified using SVM to identify AF and normal data based on 5-fold cross-validation. The results of the classification are measured using three metrics, i.e., accuracy (acc), sensitivity (se), and specificity (sp). \begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline  & & \multicolumn{10}{c}{**Daubechies Wavelet Basis Function (DWBF)**} \\ \hline  & & \(\mathbf{DB_{1}}\) & \(\mathbf{DB_{2}}\) & \(\mathbf{DB_{3}}\) & \(\mathbf{DB_{4}}\) & \(\mathbf{DB_{5}}\) & \(\mathbf{DB_{6}}\) & \(\mathbf{DB_{7}}\) & \(\mathbf{DB_{8}}\) & \(\mathbf{DB_{9}}\) & \(\mathbf{DB_{10}}\) \\ \cline{2-13}  & 1 & 92.44 & 94.46 & 86.39 & 91.39 & 82.23 & 92.86 & 88.10 & 83.57 & 84.39 & 92.10 \\  & 2 & 95.14 & 96.07 & 93.29 & 90.36 & 83.82 & 97.57 & 84.66 & 90.74 & 89.96 & 81.25 \\  & 3 & 91.24 & 94.58 & 82.89 & 83.33 & 90.70 & 96.21 & 85.16 & 88.30 & 81.39 & 95.24 \\  & 4 & 90.29 & 93.66 & 85.28 & 86.42 & 77.26 & 93.24 & 92.14 & 89.76 & 89.83 & 90.10 \\  & 5 & 90.00 & 87.23 & 84.75 & 89.13 & 88.38 & 89.72 & 90.69 & 92.62 & 89.58 & 90.82 \\  & 6 & 80.72 & 89.74 & 82.53 & 95.24 & 89.50 & 88.04 & 76.76 & 89.54 & 80.26 & 89.64 \\  & 7 & 86.98 & 82.98 & 70.81 & 91.39 & 72.47 & 89.39 & 73.87 & 91.27 & 87.30 & 84.81 \\  & 8 & 78.75 & 80.78 & 78.98 & 93.39 & 75.00 & 83.39 & 79.10 & 79.24 & 89.83 & 85.99 \\  & 9 & 75.56 & 77.14 & 77.58 & 85.95 & 75.54 & 88.57 & 80.78 & 80.44 & 80.56 & 80.12 \\  & 10 & 78.00 & 77.11 & 76.50 & 80.00 & 75.14 & 87.13 & 80.20 & 84.85 & 82.19 & 80.48 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Average sensitivity (%) due to DWBF and decomposition level (DL). Figure 8: Accuracy due to DWBF and DL. Table 5 shows the 5-CV average accuracy due to DWBF and DL parameters. As shown in Table 5, the highest accuracy is obtained when the Daubechies wavelet basis function is DB\({}_{2}\) and the decomposition level is DL\({}_{4}\)-DB\({}_{2}\)DL\({}_{4}\), i.e., 94.17%. It is followed by DB\({}_{1}\)DL\({}_{4}\) and DB\({}_{3}\)DL\({}_{4}\), i.e., 93.33% and 92.5%, respectively. To obtain the effect of the Daubechies basis wavelet function and the decomposition level, data in Table 5 were then averaged and plotted in Figure 8. As shown in Figure 8, the accuracy due to DWBF tends to fluctuate constantly in a narrow range between 83% to 86% (Accuracy@DB). However, the trend of the accuracy tends to decrease significantly when the decomposition level changes from DL\({}_{1}\) to DL\({}_{10}\) (Accuracy@Level), i.e., from 90% to 76%. Table 6 is the 5-CV average sensitivity due to DWBF and DL parameters. The best sensitivity is DB\({}_{6}\)DL\({}_{2}\) (97.57%), and it is followed by DB\({}_{6}\)DL\({}_{3}\) (96.21%) and DB\({}_{2}\)DL\({}_{2}\) (96.07%), respectively.