1. Introduction
Atrial fibrillation (AF) occurs at any age, but the incidence of AF is far more common in older adults than in children [
1,
2,
3]. In the European Union, the number of subjects with AF (those aged ≥ 55) is estimated to be doubled from 2010 to 2060, i.e., from 8.8 to 17.9 million [
4]. Meanwhile, in the US, the number of subjects with AF will reach more than 5.6 million in 2050. Half of them will be over 80 years old.
AF is a heart rhythm disorder that is characterized by irregular heart contractions [
5,
6]. It is triggered by two conditions, i.e., the deceleration of conduction velocity in various atrial regions and an increase in the heterogeneity of atrial refractoriness. Other conditions, such as an overactive thyroid (thyroid gland) or the excessive use of alcohol, can also cause AF. Although there is an insignificant relationship, AF is also often associated with an increased risk of chronic kidney disease, ischemic heart disease, and sudden cardiac death [
7,
8]. AF is not classified as a severe disease; however, it may induce paralysis complications, such as heart failure and atrial thrombosis, with a risk of stroke [
9]. One in three patients with AF will not have any symptoms. The early management of AF needs to be performed in the detection and screening of AF. In 2020, the European Society of Cardiology (ESC), through its guidelines, recommended that wearable devices be employed for the self-detection of AF in the general population [
10].
Along with advances in telecommunications technology and mobile apps, several portable AF detectors have been proposed and developed [
11]. Based on the type of signal used, AF detectors can be categorized into two groups, namely, photoplethysmogram (PPG)-based detectors and electrocardiogram (ECG)-based detectors. Fan, et al. [
12] developed an Android app on Huawei smartphones to detect AF. The application utilizes the smartphone’s camera to detect blood volume changes in accordance with the principle of the PPG sensor. Then, the validation is carried out using the ECG-12 Leads Standard. The analysis results have shown that the Android application is able to work well; the accuracy in detecting AF was 94%. Tison, et al. [
13] used a PPG-based commercial smartwatch to identify AF. Evaluation results showed that the accuracy of AF detection in patients undergoing cardioversion treatment was high. Unfortunately, it is not for outpatient use. Gropler, et al. [
14] evaluated the accuracy of ECG-based off-the-shelf KardiaMobile products from AliveCor [
15] for detecting arrhythmias (including AF) in the pediatric population. The results of the study showed that KardiaMobile could well distinguishing ECG signals in a population of healthy children and populations of children with heart disease. The false-positive rate in detecting AF was 13 percent (4/30). Using the same type of device as Gropler, et al. [
14], HABERMAN, et al. [
16] conducted research on different subjects. The subjects used in the research were elite athletes and cardiac clinic patients. The results of the study concluded that KardiaMobile was suitable for general conduction and arrhythmia screening.
There are several steps that must be performed to detect atrial fibrillation. These steps are shown in detail in
Figure 1, consisting of signal preprocessing (denoising), segmentation, feature extraction/selection, and classification [
17,
18,
19]. As shown in
Figure 1, the first step of detecting AF is denoising, which is the process of removing noise using either analog or digital filters. It can be performed in both hardware and software [
20]. The second step is signal segmentation for recognizing a complete cycle of the signal [
21]. Feature extraction/selection is a further process after the signals can be identified. In ECG-based detectors, the interval of RR is frequently used as a feature for detecting AF [
22,
23,
24,
25]. Another feature that is often utilized for AF detection purposes is the QRS signal duration, as used by Aeschbacher, et al. [
26]. Finally, classification is a technique used in grouping features according to the type of arrhythmia, such as: premature atrial contraction (PAC), premature ventricular contraction (PAC), AF, or ventricular tachycardia/ventricular fibrillation (VT/VF). Many studies have used artificial intelligence, such as machine learning algorithms, to classify the feature data of arrhythmia, such as in Yang, et al. [
27], Rohr, et al. [
28], Chickaramanna, et al. [
29], Jahan, et al. [
30], to achieve accurate detection results.
Feature extraction is the key to success in arrhythmia detection (including AF). There are several feature extraction techniques have been proposed for detecting AF features, such as in Kumar, et al. [
18], Gokana, et al. [
22], Kennedy, et al. [
23], Asgari, et al. [
31], Dalila, et al. [
32], He, et al. [
33], Saraswat, et al. [
34], Gupta, et al. [
35]. In general, ECG-based AF extraction techniques can be classified into two categories [
36], i.e., feature extraction (FE) based on dynamic features of the signal [
16,
22,
26,
37,
38,
39,
40,
41] and FE based on the signal morphology [
18,
31,
33,
34,
35].
In the dynamic feature category, there are several AF features that can be identified from ECG signals, such as RR interval, QT segments, and QRS duration. In 2014, RR intervals and the Shannon entropy of AF-confirmed ECG signals were used by Gokana, et al. [
22] as features for detecting AF. Both features were then classified using a proposed classification algorithm. The experimental results showed that the AF detection accuracy reached 99.5%. In 2019, Nguyen, et al. [
37] combined both RR intervals and the variability of QT segments as parameters of AF identification. The accuracy in detecting AF was 94%. Unfortunately, Nguyen, et al. [
37] did not share information about sensitivity and specificity in their report. Aeschbacher, et al. [
26] revealed the relationship between AF occurrence and QRS duration. They found that in a large population, QRS duration was an independent predictor of AF incidence in women but not men.
In the FE group based on signal morphology, researchers have attempted to eliminate the method for detecting P peaks, R peaks, or T peaks so that the performance of AF detection does not depend on the quality of beat detection. In 2015, Asgari, et al. [
31] used stationary wavelet transform (SWT) as a method to extract AF features from ECG signals. They used the support vector machine (SVM) classifier to classify the AF features. Experiments showed that the sensitivity achieved was 97.0% and the specificity of detection was 97.1%. He, et al. [
33] also proposed using a wavelet to obtain AF features. However, unlike Asgari, et al. [
31], the features used were continuous wavelet transform (CWT), and the classifier chosen was the convolutional neural network (CNN). The experiments carried out resulted in a sensitivity of 99.41%, with a specificity of 98.91% and an accuracy of 99.23%. In 2018, Kumar, et al. [
18] analyzed log energy entropy (LEE) and permutation entropy (PEn) features to identify AF. Both features were calculated from a sub-band signal generated by flexible analytic wavelet transform (FAWT). Experimental results showed that LEE was superior to PEn, with the accuracy, sensitivity, and specificity being 96.864%, 95.8%, and 97.8%, respectively. In the experiment, the classifier chosen was random forest (RF).
In general, morphological-based feature extraction studies, as explained in the previous paragraph, only focus on proposing new methods without an in-depth exploration of the effects of wavelet parameters, such as wavelet basis functions (WBFs) and decomposition levels, on overall system performance. As a consequence, the results are not optimal, and there is uncertainty about whether it is the best result or not. Kumar, et al. [
18] only observed the effect of the number of features derived from LEE and PEn based on accuracy, sensitivity, and specificity. The features of the wavelet function were not explored. Almost similar to Kumar, et al. [
18], Asgari, et al. [
31] also only focused on log energy entropy (LEE) and permutation entropy (PEn). As He, et al. [
33] relied on deep learning methods, they did not explore wavelet features. Parameter setting was only performed on the convolution neural network (CNN) method, such as the learning rate initial value, the moment coefficient, and several other parameters on CNN. On the other hand, Saraswat, et al. [
34] only showed wavelet features without computing the accuracy, sensitivity, and specificity of these wavelet features. Recently, Gupta, et al. [
35] proposed a fractional wavelet transform for use in the detection of AF. Instead of exploring the wavelet function for the features in detecting AF, the authors used the wavelet to remove ECG noise.
To overcome the problems above, this research proposes a study of the effect of WBF and decomposition level on the performance of artificial intelligence-based AF detection when the features used are wavelet coefficients. There are four wavelet coefficient features used in this research, i.e., maximum, minimum, average, and standard deviation of the wavelet coefficient. The artificial intelligence-based classifier chosen in this study is support vector machine (SVM). The next chapter discusses material and methods, results and discussion, and conclusions.
3. Experiment Results
Table 5,
Table 6 and
Table 7 show the results of experiments with scenarios figured in
Figure 7. Each value in the tables is an average of five tests according to the 5-fold cross-validation (CV) principle [
56]. To reveal the effect of both DBWF and DL on the performance of AF detection, all data in the tables are averaged and plotted in
Figure 8,
Figure 9 and
Figure 10.
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
2DL
4, i.e., 94.17%. It is followed by DB
1DL
4 and DB
3DL
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
6DL
2 (97.57%), and it is followed by DB
6DL
3 (96.21%) and DB
2DL
2 (96.07%), respectively. The effect of the Daubechies basis function and the decomposition level is illustrated in
Figure 9. As shown in the figure, the sensitivity deteriorates when the decomposition level changes from DL
1 to DL
10 (Sensitivity@Level). However, the decrease in the sensitivity is not as great as the decrease in the accuracy in
Figure 8. The lowest sensitivity is in DL
10. The effect of DWBF can be seen in Sensitivity@DB in
Figure 9. If it is compared to the accuracy due to DWBF in
Figure 8, the sensitivity due to DWBF in
Figure 9 fluctuates constantly in a wider range (between 80% to 91%).
Table 7 is the 5-CV average specificity due to DWBF and DL parameters. As shown in
Table 7, the highest specificity is achieved when DBWF is DB
2 and DL is on Level 4, i.e., 96.75%. Then, it is followed by DB
2DL
5 and DB
4DL
2, which have specificity at 96.57% and 94.89%. The effect of DBWF and DL can be seen in
Figure 10. Specificity@level in
Figure 10 shows that the specificity decreases from 92% to 75%. However, the fluctuation of the decline looks unstable. Additionally, Specificity@DB in
Figure 10 provides information that the DBWF fluctuates constantly in the range of 76% to 90%, which is wider than the fluctuation of sensitivity in
Figure 9.
5. Discussion
Experiments on the effect of the Daubechies wavelet basis function (DWBF) and the decomposition level (DL) to detect atrial fibrillation have been performed, and the results of experiments have been discussed in
Section 3. As shown in
Figure 8,
Figure 9 and
Figure 10, the DWBF has an insignificant effect on detection performance (accuracy, sensitivity, and specificity), although the result of experiments on the three metrics show that each metric fluctuates in different ranges when the order of DBWF changes from DB
1 to DB
10; however, the pattern of the three metrics tends to be constant. This is due to the nature of discrete wavelet transform, which has an orthogonal transformation (shifting and scaling) of wavelet basis function [
61]. In addition, the almost similar waveforms for DB
1 to DB
10 also contribute to the results. These two facts imply that false-positives and false-negatives in detecting atrial fibrillation fluctuate at nearly constant values.
The different condition occurs when the decomposition level changes from DL
1 to DL
10. All three metrics decrease with different rates. In general, this decrease is triggered by the fact that an increase in the decomposition level (from 1 to 10) causes the WCI signal to deviate from the original ECG signal. Furthermore, the sensitivity metric has a slower decrease than the other two metrics, which is due to higher false-positives found, compared to false-negatives, in the experiments. This finding is in line with the results of research by Chen, et al. [
62], who explored the effect of WBF and the decomposition level in electroencephalography (EEG) signals. Chen, et al. [
62] concluded that the decomposition level was sensitive to the performance of EEG signal detection, and wavelet basis functions have insignificant effects.
This research also compared the experimental results with other state-of-the-art research on the detection of AF. As described in
Section 4, our study has the best sensitivity in detecting AF compared to other previous studies. In addition, the accuracy and specificity that we obtained were almost the same as the previous studies’ results. More importantly, our study shows the importance of both wavelet basis function and decomposition level to get the best results, which has not been explored before in other studies.