# Leveraging IoT Devices for Atrial Fibrillation Detection: A Comprehensive Study of AI Techniques
## 3 Results
### Comparative Analysis of the Results  
Table 3 summarizes the results of the various feature extraction approaches. A comparative analysis indicated that the ML models applied to CNN-based wavelet spectrogram features (Option 3) achieved the highest accuracy scores, with the SVM model attaining an accuracy of 0.9707, effectively capturing relevant patterns for accurate AF classification. Overall, the SVM model demonstrated strong performance across different approaches, consistently yielding high accuracy scores, underscoring its effectiveness in classifying AF.  
Additionally, the stacking model for Option 3 achieved an accuracy of 0.9768, reflecting a significant enhancement in performance. The stacking models consistently demonstrated notable improvements over their individual counterparts. Specifically, the stacking model in Option 1 attained an accuracy score of 0.9438, matching the performance of the SVM model alone, while the stacking model in Option 2 reached an accuracy of 0.9707, surpassing that of the MLP model. These findings underscore the potential of combining multiple models to enhance classification accuracy.  
Regarding computational cost, Option 2 had the highest feature extraction time of 1401.80 s, significantly higher than Option 1 (0.27 s) and Option 3 (2.45 s). Option 3 offered a middle ground, being more efficient than Option 2 but still slower than Option 1.  
Training times depend heavily on available resources, so the focus here is on inference times, which were fast for all options. Option 1 had the quickest inference times, with the SVM model taking 0.000081 s per sample, while Options 2 and 3 were slightly slower but still efficient. The primary bottleneck lies in feature extraction rather than classification. Option 1 is well-suited for resource-constrained environments, whereas Option 3, despite longer preprocessing times, offers the highest accuracy and is ideal for high-stakes applications.  
Furthermore, an analysis of the deep learning approaches (Table 4) revealed that fine-tuning improved accuracy; however, these values generally remained lower compared to those obtained through feature extraction methods. This discrepancy may stem from variations in task complexity and feature selection.  
It is important to highlight a significant finding in Option 5, where transfer learning was utilized with wavelet spectrogram features. Despite the wavelet spectrogram features combined with SVM achieving the highest accuracy in Option 3, the performance of the transfer learning approach in Option 5, while close, did not reach the same level of accuracy. This discrepancy underscores the necessity of carefully selecting and integrating the appropriate models and techniques during the transfer learning process.  
In terms of computational costs, Options 4 and 5 had slower inference times than Options 1 and 2. Although these deep learning models reduce the need for manual feature extraction, they did not outperform traditional methods in efficiency or accuracy.  
In conclusion, after evaluating the various approaches, Option 3--combining neural networks for feature extraction with SVM for classification--emerges as a promising solution. This approach effectively leverages the strengths of deep learning's feature extraction capabilities while maintaining computational efficiency, making it suitable for resource-constrained devices.