## 5 Discussion  
The same as with any other classification problem, the detection of ventricular arrhythmias normally uses a feature extraction and selection stage to optimize the class separation capabilities of the classifier. This feature selection stage aims at gathering the relevant aspects of the ECG signal based on TDA. Among a wide set of features, a reduction stage is done to lower the number of features used as input to the classifier. In this work, we hypothesized that, by using Topological Data Analysis (TDA), some geometric features containing information about the'shape of data' could be extracted. This method condenses the relevant information about the shape of the data, resulting in very valuable for the detection and discrimination between shockable VF and VT rhythms, even in noise and complex signals cases. The obtained results (Tables 6-9) use the kNN classifier with the input features obtained by using two topological methods (TDA and PDI). Results show that the TDA features provide better results. For this reason, the TDA method is compared with other works in the bibliography. We have used the kNN classifier, given that it is enough to prove the improvement in classification results compared to other works. Nevertheless, using other classifiers is an open topic, which may lead to reach even better classification results. As it can be seen from Tables 6-9, the use of the proposed TDA method provides an average accuracy of 98.9% for multiclass discrimination, which differentiates \(VF\) and \(VT\) ventricular arrhythmias but also _Normal_ and _Other_ types of rhythms. On the other hand, Table 10 shows a two-class classification approach to show that the proposed TDA method provides an accuracy of 99.5% when used to discriminate shockable (\(VT\) or \(VF\)) and non-shockable rhythms (rest of cardiac rhythms). Thus, it can be established that the TDA method provides a very high classification performance. Nevertheless, we show a comparison of results with other works in the bibliography. Note, however, that this comparison is difficult due to the differences in the source signals used by different works; or even in the type of discrimination, they carry out: some works discriminate between ventricular arrhythmias and non-ventricular rhythms, others between ventricular fibrillation rhythms and non-ventricular fibrillation, others between shockable rhythms and non-shockable rhythms (considering as shockable both VT and VF). For this reason, we divide the comparison into two separate blocks: the first block focuses on the comparison with works performing rhythm discrimination, while the second focus on the comparison with those works performing shockable vs. non-shockable signal discrimination. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{2}{c}{**Type**} & \multicolumn{5}{c}{**Normal**} \\ \hline \multirow{2}{*}{**Algorithms**} & **Sensitivity\%** & \multicolumn{3}{c}{**Specificity\%**} & \multicolumn{3}{c}{**Accuracy\%**} \\ \cline{2-7}  & **Normal** & **Global** & **VF** & **VT** & **Other** & **Total** \\ \hline TDA & 99.05 & 98.45 & 99.27 & 98.88 & 97.16 & 98.76 \\ PDI & 93.09 & 92.14 & 90.22 & 91.65 & 93.95 & 92.65 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Results obtained for _Normal_ class classification in testing. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{2}{c}{**Type**} & \multicolumn{5}{c}{**Other**} \\ \hline \multirow{2}{*}{**Algorithms**} & **Sensitivity\%** & \multicolumn{3}{c}{**Specificity\%**} & \multicolumn{3}{c}{**Accuracy\%**} \\ \cline{2-7}  & **Other** & **Global** & **VT** & **Normal** & **VF** & **Total** \\ \hline TDA & 97.43 & 99.54 & 99.88 & 99.40 & 99.82 & 99.09 \\ PDI & 92.86 & 97.15 & 99.02 & 96.76 & 97.72 & 96.19 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Results obtained for _Other_ class classification in testing. Table 11 shows a group of works distinguishing between VF and non-VF rhythms. In this group, [PERSON] et al.