## 3 Results  
### Results for the Detection of Ventricular Fibrillation  
To detect ventricular fibrillation using VFDB database annotations, we segmented the ECG recordings and divided the ECG signals into 3 s segments. We chose the ECG segmentation duration of 3 s for two reasons: first, to use a substantial database for both train and test, and second, to quickly detect the onset of ventricular fibrillation requiring immediate assistance and medical treatment, as it represents severe arrhythmia episodes. We calculated the previously mentioned characteristics on these segments. We performed a two-class classification to detect ventricular fibrillation. The segments that belong to the VF class were marked as class 1, while the rest were classified as the other class. Using MLP, we achieved classification accuracies ranging between 91% and 92%, in the function of the network structure. Other classifiers available in MATLAB(r) were also tested, and some of the best results obtained are shown in Table 2.  
Thus, with an ensemble of bagged trees type classifiers, we obtained a classification accuracy of 94.6%. bagging trees builds different models using the sample subset and then aggregates the predictions of the different models to reduce the variance. Considering that \begin{table}
\begin{tabular}{c c c} \hline \hline
**No. Classes** & **Method** & **Classification Rate** \\ \hline \multicolumn{3}{c}{**ventricular fibrillation (VF) vs. remainder**} \\ \hline
2 & 94.6\% & Ensemble of classifiers \\
2 & 91.8\% & MLP \\
2 & 94.2\% & SVM \\ \hline \multicolumn{3}{c}{**normal, VF, VFL, VT, Noise**} \\ \hline
5 & 89.9\% & Ensemble of classifiers \\
5 & 85.4\% & MLP \\
5 & 85.6\% & SVM \\ \hline \multicolumn{3}{c}{**normal, VF, VFL, VT, Noise, AFIB**} \\ \hline
6 & 89.9\% & Ensemble of classifiers \\
6 & 85.4\% & MLP \\
6 & 90.4\% & SVM \\ \hline \multicolumn{3}{c}{**All classes**} \\ \hline
15 & 89.5\% & Ensemble of classifiers \\
15 & 86.4\% & MLP \\
15 & 89.2\% & SVM \\ \hline \multicolumn{3}{c}{**Aggregated ranks**} \\ \hline
**Ensemble** & **AggRanks\_weighted mean** & **AggRanks\_mean** \\
**mle** & 0.0377 & 0.4167 \\
**MLP** & 0.1027 & 1 \\
**SVM** & 0.0728 & 0.5833 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Classification outcomes for division into various categories. VF is often preceded by VT and VFL, we took out additional classes from the database, including VFL, VT, noise, and AFIB. With this approach, using five classes, we achieved a classification accuracy of 89.9% with an ensemble of classifiers. As soon as the AFIB class was added, the classification accuracy was close to the above value, achieving 90.4% when the SVM classifier was used. The overall classification rate for all 15 classes, which covers the entire database, was 89.5%. These high classification rates on multiple classes demonstrate that the chosen features are significant and can effectively discriminate between those classes. Since the problem of classification into several classes is a complex one, thus requiring a more detailed analysis [42], in addition to the classification rate, other parameters such as Recall, Specificity, Error Rate, Precision, and F1 score were calculated. In addition, there are many variants of cross-validation: Venetian Blinds, Contiguous Blocks, Random Subsets, leave-one-out, leave-many-out [43,44], etc. We tested the classification with cross-validation with leave-one-out (with five folds). The results obtained in all cases were very close, so we chose to report the average results obtained after 5 runs. To analyze the performance of different classifiers on classification problems with two, five, six, and fifteen classes, we used the rank aggregation concept with two criteria: mean and weighted mean, based on [45]. For the weighted mean, we used the classification errors as weights by multiplying element by element the values from the ranking matrix obtained based on the rank of each classifier for each classification problem. Better rankings correspond to smaller numbers.