## 4 Experiments and Results
### PCA as Fragmentation-Wave Enhancement Tool
_RMSE_ and \(\rho_{RMSE}\) were computed using the closed form,  
\[RMSE_{ECG_{1}} =\sqrt{\frac{1}{N}\sum_{i=1}^{N}{(\tilde{\textbf{X}}[i,l]- \textbf{X}[i,l])^{2}}}\] \[RMSE_{PCA_{c}} =\sqrt{\frac{1}{N}\sum_{i=1}^{N}{(\tilde{\textbf{Y}}[i,c]-\textbf{ Y}[i,c])^{2}}} \tag{6}\] \[\rho_{RMSE_{c}} =\frac{RMSE_{PCA_{c}}-max(RMSE_{ECG})}{RMSE_{PCA_{c}}+max(RMSE _{ECG})}\]  
where \(l\) correspond to the _l-th_ lead of the original ECG signal, \(X\) is the matrix that contains the beat templates of the original ECG signal, \(\tilde{\textbf{X}}\) is the fragmented replication of \(X\), \(c\) is the _c-th_ principal component, \(Y\) is a matrix that contains the principal components of \(X\), and \(\tilde{\textbf{Y}}\) is the matrix that contains the principal components of \(\tilde{\textbf{X}}\). This coefficient belongs to the interval [\(-\)1,1], and positive values of this coefficient represent RMSE values computed over normalized principal components higher than the RMSE values computed over normalized ECG. Finally, we compute the enhancement ratio as the proportion of cases where \(\rho_{RMSE}>0\). Figure 2: Example of principal components position swapping in twelve-lead PCA model. The first column shows the principal components of a control ECG, the second column shows the principal components of a synthetically fragmented replication of the previous control ECG, the third column shows the control ECG in blue, and the fragmented wave added in red. The fourth column shows the PCC between the \(i\)-\(th\) principal component of control ECG with each component of synthetically fragmented. \[aVR =-\frac{I+II}{2}\]0 Example of principal component position swapping in 8 independent leads configuration. The first column shows the principal components associated with the control ECG. The second column shows the principal components derived from the synthetically fragmented replication of the control ECG. The third column shows the original signal in blue and the fragmented wave in red. The fourth column shows the PCCs between the \(i\)-\(th\) component of the control signal and each component of the fragmented signal. In Figure 4a the distribution of \(\rho_{RMSE}\) along each principal component is shown. As it can be noticed, the effect of fragmentation is higher in the detail-components, those ones that exhibit low variance, as they usually consolidate higher frequency constituents. Figure 4b shows the defined enhancement ratio for each output-component, offering a view of the number of cases presenting the fragmentation enhancement using this technique. Finally, Figure 4c shows the joint enhancement ratio as the number of components that jointly achieve a complete detection of the fragmentation. As it can be observed, a trade-off between results and computational efficiency is reached using the 3 detail components. As we reported in the previous experiments, the fragmented wave could be a source of divergence among the principal component output. Therefore, we designed this experiment to _quantify the effect of the different parameters of the fragmented wave over the principal component order_. We used a subset of 50 cases from the control database. We created copies of these cases and we varied the fragmented wave parameters to better understand the effects in terms of where the fragmentation ends up swapping after PCA. The varied features were: amplitude, which was varied from 1 to 50% of the maximum amplitude of the signal; width of the fragmented wave, which was varied from 10 to 200 ms; number of cycles of the fragmented wave, which was varied from 0.5 to 25 cycles; and number of lead affected by the fragmentation, which was varied from 1 to 8 leads. These parameters were varied one by one to ensure that the effect of one of them over the position swapping was not contaminated by the others. We computed the confusion matrices for each case and the dispersion coefficient. In Figure 5, the dependence of the dispersion coefficient with each parameter is shown.