Central tendency measure and wavelet transform combined in the non-invasive analysis of atrial fibrillation recordings

Background Atrial fibrillation (AF) is the most common supraventricular arrhythmia in the clinical practice, being the subject of intensive research. Methods The present work introduces two different Wavelet Transform (WT) applications to electrocardiogram (ECG) recordings of patients in AF. The first one predicts spontaneous termination of paroxysmal AF (PAF), whereas the second one deals with the prediction of electrical cardioversion (ECV) outcome in persistent AF patients. In both cases, the central tendency measure (CTM) from the first differences scatter plot was applied to the AF wavelet decomposition. In this way, the wavelet coefficients vector CTM associated to the AF frequency scale was used to assess how atrial fibrillatory (f) waves variability can be related to AF events. Results Structural changes into the f waves can be assessed by combining WT and CTM to reflect atrial activity organization variation. This fact can be used to predict organization-related events in AF. To this respect, results in the prediction of PAF termination regarding sensitivity, specificity and accuracy were 100%, 91.67% and 96%, respectively. On the other hand, for ECV outcome prediction, 82.93% sensitivity, 90.91% specificity and 85.71% accuracy were obtained. Hence, CTM has reached the highest diagnostic ability as a single predictor published to date. Conclusions Results suggest that CTM can be considered as a promising tool to characterize non-invasive AF signals. In this sense, therapeutic interventions for the treatment of paroxysmal and persistent AF patients could be improved, thus, avoiding useless procedures and minimizing risks.


Introduction
The Wavelet Transform (WT) has emerged over recent years as one of the most favoured tool by researches for analyzing problematic signals across a wide variety of areas in science, engineering and medicine [1]. It is especially valuable because of its ability to elucidate simultaneously local, spectral and temporal information from a signal in a more flexible way than the short time Fourier Transform (STFT) by employing a window of variable width. This flexible temporal-spectral aspect of the WT allows a local scaledependent analysis of individual signal features. In this way, both short duration with http://www.biomedical-engineering-online.com/content/11/1/46 high frequency details and long duration with low frequency information can be captured simultaneously. Hence, the method is particularly useful for the analysis of transients, aperiodicities and other non-stationary signal features where subtle changes in signal morphology may be highlighted over the scales of interest. Another key advantage of wavelet techniques is the variety of wavelet functions available, thus allowing the most appropriate to be chosen for the signal under investigation. These special features of the WT have been applied to a wide variety of biomedical signals including electromyography, electroencephalography, clinical sounds, respiratory patterns, blood pressure trends, DNA sequences and electrocardiography [2,3]. Moreover, WT has also been successfully employed to solve several problems dealing with electrocardiogram (ECG) signals, such as feature extraction and discrimination between normal and abnormal beats, detection of ventricular late potentials, evaluation of instantaneous changes in heart rate variability, screening of patients with congestive heart failure, etc [4,5]. The present work introduces two different WT applications to ECG signals of patients in atrial fibrillation (AF) that will be next presented.
From an epidemiological point of view, AF is the most common cardiac arrhythmia, affecting almost 5% of the population older than 69 years of age and 8% of the population older than 80 years [6,7]. In this arrhythmia, there exist three main stages in which AF can be placed depending on its usual evolution [8]. Paroxysmal atrial fibrillation (PAF) use to be the first one. In this stage, the arrhythmia terminates spontaneously without the need of medical intervention. The next stage is persistent AF, which requires pharmacological or electrical cardioversion to allow its termination. Finally, the last stage is permanent AF, in which the termination is impossible or is not recommended [6]. This supraventricular arrhythmia is characterized by uncoordinated atrial activation and occurs when the electrical impulses in the atria degenerate from their usual organized pattern into a rapid chaotic pattern [6]. Thus, AF is associated with multiple meandering activation waves propagating randomly throughout the atria [9]. The fractionation of the wavefronts, as they propagate, results in self-perpetuating independent wavelets, called reentries. On the ECG, AF is described by the replacement of consistent P waves by rapid oscillations or fibrillatory (f ) waves that vary in size, shape, and timing, associated with an irregular ventricular response. Consequently, when AF occurs, a notably disorganized atrial activity (AA) can be observed on the ECG [10].
The associated risks of AF are quite serious because this arrhythmia predisposes to thrombus formation within the atria that can cause stroke or any other thromboembolic events [6]. Since about 18% of PAF patients degenerate into persistent AF in less than 4 years [11], the early prediction of AF maintenance is crucial. Thus, appropriate interventions may terminate the arrhythmia and prevent AF perpetuation. In contrast, the prediction of spontaneous PAF termination could avoid unnecessary therapy, reduce the associated clinical costs and improve the patient's quality of life. In this sense, one of the WT applications that will be next introduced tries to predict the spontaneous PAF termination.
On the other hand, electrical cardioversion (ECV) is one common therapy in the treatment of persistent AF patients. In contrast to pharmacological cardioversion, ECV is the most effective alternative to revert persistent AF back to normal sinus rhythm (NSR), especially if the arrhythmia has been present for more than 24 hours [12]. Although the ECV success rate is high, AF recurrence is common, especially during the first 2 weeks http://www.biomedical-engineering-online.com/content/11/1/46 following the procedure [13]. Moreover, ECV has also the potential of causing severe collateral effects, such as post-shock bradycardia, malignant ventricular arrhythmias, arterial thromboembolism and complications related to anesthesia [12]. Hence, it would be clinically very useful to predict NSR maintenance after ECV, before it is attempted. In this way, the risks of cardioversion could be avoided for those patients with high risk of short-term recurrence and, for the health care provider, clinical costs could be optimized because unproductive treatment time and bed usage could be reduced. As a consequence, other very useful application of the WT should be the prediction of ECV outcome in persistent AF.
For the two aforementioned applications of the WT, i.e., the prediction of spontaneous PAF termination and the prediction of ECV outcome in persistent AF, wavelet analysis was combined with a non-linear approach, using continuous chaotic modelling that summarizes the degree of variability in a signal, such as the central tendency measure (CTM) [14]. More precisely, the CTM from the first differences scatter plot of the wavelet coefficients vector associated to the scale containing the typical AF frequency range, was used to evaluate atrial activity f waves organization time course. To this respect, structural changes into surface f waves reflect the intraatrial activity organization variation [15]. The analysis of this variation is crucial, because several works have demonstrated a decrease in the number of reentries prior to AF termination. Hence, this decrease will provoke an organization variation in the f waves and the atrial activity (AA) will slightly evolve to a more organized pattern before AF termination [16]. Moreover, in the context of ECV, some works have also suggested that NSR maintenance would be more likely in patients who present a highly organized AA, because the more disorganized the AA, the higher the number of propagating wavelets [17] and the larger the atrial volume that could support reentries propagation after the shock [18].
The remaining paper is structured as follows. Section Materials describes the used databases, whereas section Methods explains preprocessing applied to ECG recordings, the proposed algorithm based on WT and CTM to predict AF behavior and the statistical study that was carried out. Section Results summarizes the obtained results, which are next discussed in section Discussion. Finally, section Conclusions presents the concluding remarks that will lead the paper to its end.

Materials
In this work two databases were employed. First, a set of PAF recordings were analyzed to predict spontaneous termination of AF and, secondly, a set of persistent AF recordings were studied to predict ECV outcome. In the next sub-sections, additional details in this respect can be found.

Paroxysmal AF database
Fifty Holter recordings of 30 seconds in length and two leads (II and V1) available in Physionet [19] were analyzed. The database included 26 non-terminating PAF episodes (group N), which were observed to continue in AF for, at least, one hour following the end of the excerpt, and 24 PAF episodes terminating immediately after the end of the extracted segment (group T). These signals were digitized at a sampling rate of 128 Hz and 16-bit resolution. Nonetheless, they were upsampled to 1024 Hz in order to allow better alignment for QRST complex subtraction, such as Bollmann et al. suggested [10]. http://www.biomedical-engineering-online.com/content/11/1/46 This processing step is necessary to extract the AA from the surface ECG, see section Data preprocessing.

Persistent AF database
Sixty-three patients (20 men and 43 women, mean age 73.4 ± 9.0 years) with persistent AF lasting more than 30 days, undergoing ECV were followed during four weeks. A standard 12-lead ECG was acquired for each patient during the whole procedure and a segment of 30 seconds in length preceding the cardioversion was extracted from each recording for the analysis. All signals were digitized at a sampling rate of 1024 Hz and 16-bit resolution.
After the ECV, 22 patients (34.93%) maintained NSR during the first month. On the contrary, in 31 patients (49.20%), NSR duration was below 1 month and the remaining 10 (15.78%) relapsed to AF immediately after ECV. These 41 patients constituted the group of AF recurrence. All patients were in drug treatment with amiodarone. The median arrhythmia duration was 10.58 months (range 1-47.22) and echocardiography demonstrated a mean left atrium diameter (LAD) of 45.82 ± 6.93 mm. 20.63% of the patients presented underlying heart disease. No statistically significant differences were found in the aforementioned clinical parameters between the patients who maintained NSR and relapsed to AF.

Data preprocessing
In both databases, lead V 1 was chosen for the analysis because previous works have shown that AA is dominant in this lead [20]. This signal was preprocessed using forward/backward highpass filtering with 0.5 Hz cut-off frequency to remove baseline wander, next, lowpass filtering with 70 Hz cut-off frequency was applied to reduce high frequency noise and, finally, notch filtering at 50 Hz was applied to remove powerline interference [21]. On the other hand, reliable analysis of the AA from surface ECG recordings requires that ventricular activity has first been cancelled [10]. Although a variety of different techniques exist for this purpose, an adaptive singular value QRST cancellation template was applied [22].

Wavelet Transform
From a mathematical perspective, the wavelet is a smooth and quickly vanishing oscillating function with good localization in both time and frequency. A wavelet family a,b (t) is the set of elementary functions generated by dilations and translations of a unique admissible mother wavelet (t) [23], i.e.
where a, b ∈ , a = 0 are the scale and translation parameters, respectively, and t is the time. As a increases, the wavelet becomes narrower. Thus, one have a unique analytic pattern and its replications at different scales and with variable time localization. The Discrete Wavelet Transform (DWT) is the sampled version of the Continuous Wavelet Transform (CWT) in a dyadic grid employing orthonormal wavelet basis functions [23]. Hence, the parameters a and b are sampled using a logarithmic discretization of the a scale (a = 2 m ) and this, in turn, is linked to the steps size taken between the b http://www.biomedical-engineering-online.com/content/11/1/46 locations. To link b to a, each location b, which is proportional to the a scale, is moved in discrete steps (b = n · 2 m ). Thus, the discretized mother wavelet is being m and n the new scale and translation discrete parameters, respectively, and k the discrete time instant. Hence, the wavelet decomposition of the AA signal, x AA (k), can be defined as its correlation with the chosen wavelet family m,n (k) for each m and n, i.e.
The decomposition results in wavelet coefficients C, which depend on scale and position. In fact, a vector of wavelet coefficients C m is obtained for each analyzed discrete scale m. The information stored in the wavelet coefficients vectors is not repeated elsewhere and allows the complete regeneration of the original signal without redundancy, because the used discretization of the mother wavelet employs orthonormal basis functions [23].

Central Tendency Measure
Chaotic equations are sometimes used to generate graphs. Thus, the graph x(n + 2) − x(n + 1) versus x(n + 1) − x(n) produces a scatter plot of first differences of the data, x(n) being the value of a time series at time n. This plot, centered around the origin, gives a graphical representation of the variability degree in the time series and is useful in modeling biological systems, such as hemodynamics and heart rate variability [14]. With this approach, rather than defining a time series as chaotic or not chaotic, the degree of variability or chaos is evaluated.
The CTM is computed from a first differences scatter plot of the data selecting a circular region of radius ρ around the origin, counting the number of points that fall within the radius, and dividing by the total number of points. A low CTM value indicates a large amount of dispersion and a high value indicates concentration near the centre. Given N data points from a time series, N − 2 would be the total number of points in the scatter plot. Then, the CTM can be computed as [14] where In the present work, f waves organization was estimated by computing the CTM from the first differences scatter plot of the wavelet coefficients vector for the scale containing the typical AF frequency range. For this purpose, a seven-level wavelet decomposition was applied to the AA signal. The seventh discrete scale resulted in a good match to the AA frequency band of interest [24], i.e. 4-8 Hz. In fact, the dominant atrial frequency (DAF), i.e., the highest amplitude frequency, was within this range for all the analyzed patients. Furthermore, previous works have proved that values for this frequency below 4 Hz or above 8Hz are unusual [25].
A good matching between wavelet scale and AF frequency range is relevant to preserve the essential behavior of the arrhythmia. In this respect, the DAF has provided to be a http://www.biomedical-engineering-online.com/content/11/1/46 concomitant indicator of atrial refractroriness [26], thus revealing very clinically interesting information about AF progression under different therapies [16]. Remark that for sampling rates different from 1kHz, the seventh wavelet scale could not match properly to the typical AF frequency range and, consequently, the proposed method performance could be notably reduced. Thus, resampling up to 1kHz of new input ECG recordings has to be considered as a previous step before their processing under the proposed method.

Optimal parameters selection
The proposed method performance depends on the chosen wavelet function and the radius ρ selected for computation of CTM. However, there are no established rules for the choice of their optimal values [2]. To this respect, a cautious and still exploratory approach is to test different wavelet families and then to compare their efficiency in the specific problem [27]. Unfortunately, on each electrocardiographic application where the WT has been used, a different wavelet family was chosen [4]. In this study, several orthogonal wavelet families were tested, because only in an orthogonal basis any signal can be uniquely decomposed and the decomposition can be inverted without loosing information [23]. Thus, all the different functions from Haar, Daubechies, Coiflet, Biorthogonal, Reverse Biorthogonal and Symlet wavelet families were tested.
On the other hand, an approach similar to the developed by Hornero et al [28] was used to select the optimal ρ value. Thus, the CTM was computed for radius values of 0.1, 0.2, . . . , 10 times the standard deviation of the analyzed data, i.e., the wavelet coefficients vector associated with the seventh discrete scale. Normalizing ρ in this way provides translation and scale invariance, in the sense that CTM remains unchanged under uniform process magnification, reduction or constant shift to higher o lower values. To this respect, note that the wavelet vector interesting information is carried by the coefficients temporal variations, rather than its absolute amplitude variations. In fact, the amplitude is only dependent on the similarity between the AA under study and the selected mother wavelet. Hence, amplitude gives no useful information about f waves variability.

Statistical analysis
As the considered number of episodes for both analyzed databases was not notably large, the proposed method was validated by a resubstitution approach, i.e., it was learned from all the available data and then tested on the same set of data. The CTM value, for a specific ρ value and wavelet function, providing maximum discrimination between groups, that is, the optimum threshold, was obtained by means of a receiver operating characteristic (ROC) curve. The ROC curve is a graphical representation of the trade-offs between sensitivity and specificity when discrimination threshold is varied. For PAF patients, sensitivity (i.e. the true positive rate) was considered as the proportion of non-terminating PAF episodes correctly discerned, whereas specificity (i.e. the true negative rate) represented the percentage of terminating episodes properly identified. Similarly, for the ECV outcome analysis, sensitivity was the proportion of patients relapsing to AF appropriately classified and specificity was the percentage of patients resulting in NSR after ECV accurately predicted. The total number of PAF patients and ECVs precisely classified was considered as the diagnostic accuracy corresponding to each prediction. The CTM value providing the highest accuracy was selected as optimum threshold. The area under the ROC curve (AROC) was also computed. AROC is a single number which represents a http://www.biomedical-engineering-online.com/content/11/1/46 summary of performance. For a perfect test the area is 1, while an AROC of 0.5 represents a worthless test.
To verify representativeness of the used databases and generality of the results obtained by the resubstitution approach, a leave-one-out cross-validation (LOOCV) scheme was also used. In this procedure, the method was trained and tested a number of times equal to the number of patients in the database. In each iteration, all the data, except for a single observation, were used for training and the model was tested on that single observation. In addition, significant differences between terminating and non-terminating PAF episodes and between patients who resulted in NSR and relapsed to AF were evaluated making use of a Student's t-test. All the groups had a normal and homoscedastic distribution as the Shapiro-Wilk and Levene tests proved, respectively. A two-tailed value of statistical significance p < 0.05 was considered statistically significant.

Optimal parameters selection
For each studied wavelet function, CTM values from each patient group in the databases were computed with a ρ equal to 3 times the standard deviation of the analyzed wavelet coefficients vector. Preliminary experiments showed successful outcomes with this ρ that, later, will be adapted more specifically. Differences between patient groups were evaluated by means of Student's t-test and sensitivity, specificity and accuracy of the classification approach were computed making use of a ROC curve. In all the functions of the same wavelet family, similar statistical significance values and the same sensitivity, specificity and accuracy values were noticed for each analyzed AF scenario. Thus, only the function presenting the lowest p value is included in Tables 1 and 2 for each wavelet family. As can also be appreciated in these tables, all the wavelet families reached the same discriminant ability for each analyzed scenario. Moreover, the same patients were incorrectly classified by all the families. Consequently, any wavelet family could be used indistinctly. Nonetheless, both for PAF termination and ECV result predictions, the lowest statistical significance value was noticed for biorthogonal family of order (4,4), such as in previous works [29,30]. Thus, considering that only one wavelet function can be applied to the proposed methodology, the aforementioned wavelet function was selected.
After optimal wavelet function selection, the proposed method dependence on the radius ρ was investigated following the process described in section Optimal parameters  selection. For each tested ρ value, statistical differences between terminating and nonterminating PAF episodes and between patients who relapsed to AF and maintained NSR after ECV were evaluated by using Student's t-test. In both cases, statistically significant differences were found for ρ values between 2.8 and 5.6. Nonetheless, the lowest p value was noticed for ρ = 3.3 and ρ = 4 in PAF termination and ECV outcome predictions, respectively. Thereby, the CTM was computed with these ρ values in each analyzed AF scenario.

Classification performance
For PAF termination prediction, CTM values computed with previously described optimal parameters provided sensitivity, specificity and accuracy of 100% (26 out of 26), 91.67% (22 out of 24) and 96% (47 out of 50). In addition, 94% (46 out of 50) of cross-validated grouped cases were correctly identified. The ROC curve provided 0.888 as optimum discrimination threshold between terminating and non-terminating PAF episodes with an AROC of 0.974, see Figure 1(a). Additionally, Figure 1(b) shows that the non-terminating PAF episodes presented higher CTM values (0.963 ± 0.036) than the terminating ones (0.855 ± 0.040). As an example, Figure 2 shows a 10 second-length ECG interval, its extracted AA signal, the wavelet coefficients vector corresponding with the seventh discrete scale and its first differences scatter plot for a typical terminating PAF episode and other non-terminating one. Faster temporal variations within the wavelet coefficients vector and, hence, higher dispersion in scatter plot and lower CTM value can be appreciated for the terminating AF episode. Regarding ECV outcome prediction, the ROC curve provided 0.823 as optimum CTM discrimination threshold, in which 82.93% (34 out of 41) sensitivity and 90.91% (20 out of 22) specificity were obtained, see Figure 3(a). Hence, the ECV outcome in 54 out of 63 patients (85.71%) was correctly predicted, with 82.54% (52 out of 63) of cross-validated grouped cases appropriately identified. An AROC of 0.940 was achieved. Moreover, the patients relapsing to AF presented lower CTM values (0.761 ± 0.054) than those resulting in NSR after one month (0.880 ± 0.050), such as Figure 3(b) shows. As for PAF termination prediction, Figure 4 presents typical ECG intervals, extracted AA signals, wavelet coefficients and scatter plots for a patient who maintained NSR and other relapsing to AF during the first month post-cardioversion of persistent AF. In this case, a higher variation rate within the wavelet coefficients, associated with a lower CTM value, was observed for patients who relapsed to AF.
Other interesting result from Figure 3(b) is that all the patients relapsing to AF immediately after ECV were appropriately identified with a CTM threshold of 0.749. Indeed, these patients presented CTM values (0.727 ± 0.021) lower than the remaining ones who relapsing to AF during the first month post-cardioversion (0.771ś 0.057), the statistical significance being lower than 0.001. Nonetheless, note that the false positive rate was 32.26% (10 out of 31).

Comparison with previous works
Non-linear analysis metrics are a valuable tool in the assessment of physiological time series because hidden information related to underlying mechanisms can be obtained [31,32]. To this respect, it has become evident through a number of studies that http://www.biomedical-engineering-online.com/content/11/1/46  4) and a ρ value of 3.3 times the standard deviation of analyzed data were used as parameters for CTM computation. The CTM value providing the highest accuracy was selected as optimum threshold, which has been marked with symbol •. (b) Classification into terminating and non-terminating PAF episodes.
the cardiac system is non-linear on its behavior [33]. Furthermore, regarding the employment of non-linear metrics, Sample Entropy (SampEn) has been successfully applied to the surface ECG in AF. In this case, SampEn has been computed over the main atrial wave (MAW). The MAW is the fundamental waveform associated to the AA signal and has served as the starting point to estimate non-invasively AF organization. Through the MAW-SampEn strategy, it has been possible to achieve a diagnostic ability of 90% in the prediction of PAF termination [34] and approximately 80% in the prediction of ECV outcome [35]. Similarly, f waves regularity has also been assessed through the application http://www.biomedical-engineering-online.com/content/11/1/46

Figure 2 Representative plots for PAF prediction.
Typical ECG interval together with its extracted AA signal and the wavelet coefficient vector corresponding with the seventh discrete scale together with its scatter plot of first differences for (a) a non-terminating and (b) other terminating PAF episode.
of SampEn to the wavelet domain of the AA signal. In this case, the wavelet-SampEn approach reached a discriminant capability of 90 and 82% for PAF termination and ECV outcome predictions, respectively [29,30]. Nonetheless, SampEn might be notably sensitive to the presence of noise [34,36] and spikes [37]. Thus, given that QRST residua are often present in the extracted AA [20,22] and the predictive ability of Wavelet-SampEn could be improved, the analysis of alternative non-linear methods is desirable to develop top performance single classificators of AF organization-related events.
In the present work the CTM from the first differences scatter plot of the wavelet coefficients vector associated to the AF frequency scale has been analyzed. The presented strategy reached the highest diagnostic ability as a single predictor published to date, i.e., 96% and 86% for PAF termination and ECV outcome, respectively. Given that comparison with previous works can be unfair for some cases because different datasets were used, Tables 3 and 4 present the most recently proposed methods, together with relevant information about their validation and performance, to predict PAF termination and ECV outcome, respectively. As aforesaid, AF organization evaluation based on MAW-SampEn or in Wavelet-SampEn provided interesting diagnostic accuracies in both analyzed AF scenarios, but lower than the Wavelet-CTM strategy. In a similar way, the f waves amplitude also showed an interesting ability in the prediction of ECV outcome with an accuracy near 80% [38] but, again, lower than this new introduced strategy.
Regarding the frequency domain, a variety of works analyzed the DAF of the AA signal, providing diagnostic abilities in PAF termination prediction between 86% and 90%, depending on the used method for its computation [40,41]. Holmqvist et. al. [44] evaluated a parameter obtained from time-frequency analysis of the AA signals, such as harmonic decay [24], but a low number of patients relapsing to AF after ECV were http://www.biomedical-engineering-online.com/content/11/1/46  4) and a ρ value of 4 times the standard deviation of analyzed data were used as parameters for CTM computation. The CTM value providing the highest accuracy was selected as optimum threshold, which has been marked with symbol •. (b) Classification into patients resulting in NSR and relapsing to AF after 4 weeks following ECV.
correctly identified (47%). Finally, in [46], ventricular rhythm was analyzed using threedimensional RR intervals plots, quantifying clustering of RR intervals, however, only 50% of patients who relapsed to AF during the first 4 weeks following ECV were correctly discerned. Nevertheless, single parameters combinations and advanced classification tools can be found in the literature to predict AF behavior. Thus, regarding PAF termination prediction, DAF has been combined with other parameters to improve its diagnostic accuracy. http://www.biomedical-engineering-online.com/content/11/1/46

Figure 4 Representative plots for ECV result prediction.
Typical ECG interval together with its extracted AA signal and the wavelet coefficient vector corresponding with the seventh discrete scale together with its scatter plot of first differences for (a) a patient who maintained NSR and (b) other relapsing to AF during the first month post-cardioversion.
To this respect, Petrutiu et al [42] studied the AA peak frequency power evolution within the last two seconds before spontaneous PAF termination, reaching thus an accuracy of 93.33%. The same classification result was reported by combining SampEn and WT [29]. In that work, SampEn was used to assess f waves regularity from the time and wavelet domains of the AA signal, providing two different and independent classifications, which were combined as a function of the DAF. A slightly higher result (accuracy of 96.67%) was reached by Sun & Wang [39] making use of a multilayer perceptron neural network to combine 11 features extracted from the ECG recurrence plot quantification. With regard to ECV outcome prediction, Watson et al [43] examined a variety of wavelet transformbased statistical markers, which obtained a sensitivity of 88% and specificity of 100% by means of a non-parametric classification system. Zohar et al [45] developed a nondeterministic model with several parameters as inputs for predicting NSR maintenance after ECV, providing a diagnostic accuracy of 84%. As for PAF termination prediction, the AA signal organization estimation both in time and wavelet domains through SampEn provided an sensitivity of 95% and specificity of 93% [30]. However, it is worth noting that in this study only patients undergoing the first attempt of ECV and, therefore, with AA signals notably organized [47], were analyzed. Finally, recent works have reported that the combination of f waves amplitude with the DAF [38] and SampEn [35] computed from the MAW reached a discriminant ability of 86 and 90%, respectively.
Bearing this context in mind, it can be noticed that only complex combinations of single predictors can improve the CTM classification result. Thereby, the proposed metric can be considered as a promising single estimator of PAF termination and ECV outcome prediction, with the additional advantage of a simpler implementation to work in real-time. To this respect, DWT can be computed efficiently with a pyramid filter bank algorithm   [23], allowing thus its implementation in real-time [48,49]. In contrast, the classical algorithm proposed in the literature for SampEn computation requires a high execution time, which is not fast enough for online applications [50]. Although faster alternatives for Sam-pEn computation have been recently proposed [50,51], their ability to be implemented in real-time environments has not been proved yet. In addition, accuracy of these new algorithms has not been validated by comparison with the classical SampEn definition. On the other hand, it has to be remarked that the complex combination of multiple parameters or the use of advanced classification techniques, such as in [39] or in [43], makes difficult the clinical interpretation of the results. In this sense, possible clinical meaning of each parameter is blurred within the classification approach.

Interpretation of results
Taking a specific wavelet decomposition scale, the coefficients vector contains the similarity evolution through time between the analyzed signal and the scaled mother wavelet. A low variability in this time series implies an invariable waveform, regardless of its concrete shape, along the studied time period. In contrast, high variability implies variable waveforms that may, eventually, evolve to a more organized pattern. This fact justifies the results obtained in the prediction of spontaneous PAF termination, where terminating episodes presented wavelet vectors with higher variability than non-terminating ones, see Figure 1. The AA evolution from disorganized f waves to organized P waves that takes place in AF recordings prior to its termination may cause this behavior in the wavelet coefficients vector [20].
Regarding ECV result analysis, the presence of more structured f waves in organized AA signals [15,20] could justify the obtained results, which show that patients who relapsed to AF presented wavelet coefficients vectors with higher variability than those who remained in NSR, see Figure 3. In fact, patients relapsing to AF immediately after ECV presented, in average, lower CTM values than the remaining ones. These findings, suggesting more organized AA signals in effective cardioversions one month after the procedure, agree with observations obtained from previous works, such as: (i) the higher the AA organization, the higher the success rate in AF cardioversion [17,52], (ii) the higher the AA organization, the lower the energy required for successful cardioversion [18] and (iii) PAF requires less energy for cardioversion than persistent AF [53]. These observations highlight the fact that, when a higher number of reentries are wandering throughout the atrial tissue, a lower probability of successful ECV is obtained. One possible explanation could be that a low degree of AA organization might result in an increased mass of atrial myocardium that is not fully excitable [52].

Study limitations
The analysis was developed with a limited group of patients. Hence, a larger sample allowing a more rigorous statistical study would be required to provide improved confidence in the robustness of the developed approach. To this respect, wider databases containing non-terminating and spontaneously terminating PAF episodes after different time epochs (ten minutes, half an hour, an hour, ten hours, etc.) and patients who resulted in NSR and relapsed to AF after 3, 6, and 12 months following ECV would be necessary. In addition, the availability of longer PAF recordings would allow to address the interesting question about the time in advance with which spontaneous PAF termination could be predicted. http://www.biomedical-engineering-online.com/content/11/1/46 On the other hand, the persistent AF database only included suitable ECV patients following the standard clinical criteria; therefore, it is unknown how the proposed algorithm will behave in patients with adverse clinical predictors, like atrial dilatation, etc., which, by default, are excluded from ECV procedures. Finally, only lead V 1 was analyzed rejecting the possible information contained in the remaining leads. However, for this type of studies, lead V 1 seems to be the most suitable lead because significant correlations between the atrial frequency [54] and SampEn [15] obtained from this lead and those obtained from atrial electrograms have been observed.

Conclusions
The present work has demonstrated that AF organization can be evaluated non-invasively through the application of CTM to the wavelet coefficients vector containing the AF frequency range. This non-linear index has proved to be the most predictive single estimator of spontaneous PAF termination and ECV outcome published to date. Nonetheless, although complex and advanced combinations of other parameters measured from the ECG can improve its diagnostic ability, the proposed algorithm has interesting advantages, including a clear clinical interpretation of the results and the possibility of real-time operation. Hence, its use may lead towards the development of improved therapeutic interventions for the treatment of paroxysmal and persistent AF, since useless procedures could be avoided and the consequent risk for the AF patients could be minimized.