## 5 Conclusions  
We presented a broader analysis of the detection of ventricular fibrillation (VF) and the possibility of its prediction. The detection and prediction methods presented are based on the use of features in the time and frequency domains and the use of waveform complexity indices from nonlinear dynamics.  
**For the case of VF detection**, we used the MIT-BIH Malignant VFDB, and the analysis included the grouping of 3 s ECG segments into five and six classes for the identification of VF. In addition to this classification, they were also classified into all 15 classes present in the database with which VF detection was tested. The detection accuracy of changes in the normal sinus rhythm, that is, the accuracy of classifying into two groups, is related to the type of the classifier used. Specifically, the ensemble classifier achieves a detection rate of 94.6%, while the MLP achieves a detection rate of 91.8%. The classification accuracy for 15 classes by means of the SVM classifier was 89.2% and 89.5% with an ensemble of classifiers. The identification accuracy for six classes (normal, VF, VFL, VT, Noise, AFIB) using the SVM machine was 90.3%.  
**For the case of VF prediction**, we used two databases from MIT-BIH, the NSR database and SCDH. The testing was carried out both on ECG segments from both databases and only for the SCDH database. Thus, for an MLP, a forecast rate of over 95% was achieved. Moreover, with an ensemble of classifiers, VF can be predicted with an accuracy of over 99%, which is one of the greatest values reported in the literature. The achieved outcomes show that VF can be forecasted 40 and even 50 min before. To validate the proposed method, an additional test was carried out on SCDH recordings. This testing was carried out on ECG segments cut 50 min before VF and 50 min after VF, the latter being considered as normal segments, which would not predict VF. For this case, when only SCDH databases were used, we obtained prediction results of 90.3% with an ensemble of classifiers and 87.3% with MLP. According to our knowledge, this accuracy of 90.3% is the best result of VF prediction at 50 min before its first episode.  
**In conclusion**, the proposed methodology provides useful information for the detection of VF in real time with a reduced computation time, discriminating satisfactorily this type of arrhythmia from other cardiac pathologies. Also, the proposed method is able to predict with an advance of 40 or even 50 min before the installation of a VF event.  
**Author Contributions:** Conceptualization, M.F., H.-N.C. and L.G.; methodology, M.F.; software, M.F.; validation, M.F., H.-N.C. and L.G.; formal analysis, M.F.; investigation, M.F.; resources, M.F. and H.-N.C.; data curation, M.F.; writing--original draft preparation, M.F., H.-N.C. and L.G.; writing--review and editing, M.F., H.-N.C. and L.G. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research received no external funding.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The data presented in this study are openly available in [physionet] at [10.13026/C2W306 and 10.13026/C22P44 and 10.13026/C2 NK5R], reference number [33; 38; 39]. The webpage of the MIT-BIH Database is \"[[https://physionet.org/content/sddb/1.0.0/](https://physionet.org/content/sddb/1.0.0/)]([https://physionet.org/content/sddb/1.0.0/](https://physionet.org/content/sddb/1.0.0/))\", [[https://physionet.org/content/vfdb/1.0.0/](https://physionet.org/content/vfdb/1.0.0/)]([https://physionet.org/content/vfdb/1.0.0/](https://physionet.org/content/vfdb/1.0.0/)) and [[https://www.physionet.org/content/nsrdb/1.0.0/](https://www.physionet.org/content/nsrdb/1.0.0/)]([https://www.physionet.org/content/nsrdb/1.0.0/](https://www.physionet.org/content/nsrdb/1.0.0/)) (accessed on 1 March 2024).  
**Conflicts of Interest:** The authors declare no conflicts of interest.