## 6 Conclusions  
This study addresses the challenge of processing patient HRV datasets for classification tasks using resource-efficient methods, synthetic data generation, deep learning techniques, and transfer learning. The utilization of these techniques offers a promising approach to overcome the limitations posed by small datasets in medical research, enabling robust analysis and model development. The schematic overview provided in Figure 1 illustrates the pipeline employed in the classification of atrial fibrillation and cardiovascular events based on HRV data, highlighting the integration of various methodologies for comprehensive data analysis with final prediction performance. Such methods can provide clinicians with useful insights about the condition of patients in advance of event outcomes, allowing them to design the best therapeutic path to prevent severe consequences. The aim was to prove that synthetic data can improve clinical decision support system performance, but, in future works, it will be interesting to explore the performance of the models when changing and optimizing parameters like the size of the synthetically generated data and the model hyperparameters. The study's limitations include the reliance on small, imbalanced datasets despite synthetic augmentation, which may not fully capture real-world variability. The fidelity of the generated data to actual clinical scenarios needs further validation. Additionally, the approach's generalizability across diverse populations and its integration into routine clinical workflows remain untested, warranting broader studies. We generated synthetic data to overcome the small dimensions and proportions of the dataset, and we proved that this approach secured a boost in classification performance. The main contributions of this work can be summarized as follows:  
* Usage of a small fraction (5 or 3 min) of ECG data to extract HRV parameters. * Usage of synthetic data generation to improve performance, even with unbalanced datasets, while safeguarding the privacy of the patients. * Prediction of CEs is an important aim for the optimal allocation of clinical resources. Estimating event outcomes can help design efficient therapeutic paths. * The models trained with synthetic data and transfer learning outperformed the same architecture trained with only real data and without transfer learning. * TL is efficient in predicting CEs with a model trained for atrial fibrillation. Merging pathologies with similar features could help improve the efficacy of the prediction model. **Author Contributions:** Conceptualization, F.G., A.S., L.P. and E.I. ; Methodology, F.G., A.S. and L.P.; Software, F.G., A.S., L.P. and E.I. ; Validation, A.S., M.M. and E.I. ; Formal analysis, A.C.; Resources, M.M. and E.I. ; Writing--original draft, F.G. and A.S.; Writing--review & editing, A.S. and A.L. ; Visualization, A.S. and A.C.; Supervision, A.L. and E.I. ; Project administration, E.I. All authors have read and agreed to the published version of the manuscript. **Funding:** This research received no external funding. **Institutional Review Board Statement** Ethical review and approval were waived for this study due to the fact that there was no deviation from the \"normal care\" of patients who had provided consent for the management of personal data. **Informed Consent Statement**: Informed consent was obtained from all subjects involved in the study. **Data Availability Statement**: The datasets and code scripts for this study are accessible at [[https://github.com/alexsalman/heart_rate_variability](https://github.com/alexsalman/heart_rate_variability)]([https://github.com/alexsalman/heart_rate_variability](https://github.com/alexsalman/heart_rate_variability)) (accessed on 12 November 2024). **Conflicts of Interest**: The authors declare no conflicts of interest. Figure A2: Feature importance in cardiovascular events (CE) dataset. Top 20 important HRV features for CE classification.