## 3 Materials and Methods
### Multivariate Analysis for Fragmented-Wave Isolation  
In an attempt to boost fragmentation waves within the ECG, two approaches were explored. Taking into account that, according to medical knowledge, fragmented waves are expected to debut in the ECG as an additive limited amplitude wave over standard QRS Complex, our first approach assumed uncorrelation among the QRS components and the fragmentation waves. Hence, PCA is proposed as a likely valid tool to detach and consolidate all the diffused constituents of the different projections of the affection over the separate leads. In our second approach, we assumed that the fragmented waves could be modeled as statistically independent from the other waves in the ECG, and accordingly we proposed the use of ICA for the same objective. A deep description on PCA and ICA multivariable techniques and applications can be easily found in the corresponding references included hereafter, although a short description is included next for the reader convenience. PCA is a statistical multivariate processing tool that allows us to decompose a signal in uncorrelated sub-signals, so-called principal components. From a mathematical point of view, PCA can be defined as an orthogonal linear transformation that maps the input signals to a new coordinate system where the new orthogonal axes are the directions of maximum variation of the input signals. This also means that we are implicitly assuming a multivariate Gaussian distribution on the time samples of the analyzed multivariate recording. In order to compute the PCA of the ECG signals, several steps must be followed, which are summarized next: First, the data must be centered and scaled, and this process is done by subtracting the mean from each variable and dividing by its standard deviation, in order to get the input signals with zero mean and unit variance; Second, the covariance matrix of the input signals is computed, and this matrix takes into account the variance of each variable in our signals; Third, the eigenvectors and eigenvalues of the covariance matrix are computed; Then, the eigenvectors are sorted according to the decreasing value of their eigenvalues; Finally, the principal components are computed by vector-multiplying the eigenvectors and the input signals [27]. ICA is a statistical multivariate method for decomposing signals in a set of new ones that are statistically independent. Let us denote  
\[\mathbf{X}=\mathbf{S}\cdot\mathbf{A} \tag{2}\]  
where \(\mathbf{X}\) is the matrix that contains the recorded multichannel ECGs, \(\mathbf{S}\) is matrix that represents the effect of the patient body over the heart surface signals represented by a mixing matrix, and \(\mathbf{A}\) represents the heart surface signals. ICA is defined as a linear transformation that can unmix the previously mixed signals, in other words, ICA can compute matrix \(\mathbf{S}^{-1}\) without knowing \(\mathbf{A}\) and \(\mathbf{S}\), as far as the source signals in \(\mathbf{A}\) meet some special conditions, namely, the source signals must be statistically independent, and the statistical distribution of the source signals must be non-Gaussian. The steps to compute ICA are next summarized. First, the input signal is centered and whitened, in order to get an uncorrelated input signal with zero mean and unit variance. Second, the independent components are computed, and for this purpose the method selected here (FastICA) uses an iterative process that minimizes the Gaussianity of the extracted components by using the concept of negentropy. Finally, and due to the unmixed signal given by ICA are unsorted, it is necessary to sort them, and for this purpose we proposed the use of the kurtosis as sorting key to sort the variables from less Gaussian to more Gaussian [28]. The use of PCA or ICA has two drawbacks that can especially affect us. The first one is referred to the sign of the output.