Supervised Machine Learning Based Noninvasive Prediction of Atrial Flutter Mechanism from P-to-P Interval Variability under Imbalanced Dataset Conditions

Atrial flutter (AFL) is a common arrhythmia with two significant mechanisms, namely, focal (FAFL) and macroreentry (MAFL). Discrimination of the AFL mechanism through noninvasive techniques can improve radiofrequency ablation efficacy. This study aims to differentiate the AFL mechanism using a 12-lead surface electrocardiogram. P-P interval series variability is hypothesized to be different in FAFL and MAFL and may be useful for discrimination. 12-lead ECG signals were collected from 46 patients with known AFL mechanisms. Features for a proposed classifier are extracted through descriptive statistics of the interval series. On the other hand, the class ratio of MAFL and FAFL was 41 : 5, respectively, which was highly imbalanced. To resolve this, different data augmentation techniques (SMOTE, modified-SMOTE, and smoothed-bootstrap) have been applied on the interval series to generate synthetic interval series and minimize imbalance. Modification is introduced in the classic SMOTE technique (modified-SMOTE) to properly produce data samples from the original distribution. The characteristics of modified-SMOTE are found closer to the original dataset than the other two techniques based on the four validation criteria. The performance of the proposed model has been evaluated by three linear classifiers, namely, linear discriminant analysis (LDA), logistic regression (LOG), and support vector machine (SVM). Filter and wrapper methods have been used for selecting relevant features. The best average performance was achieved at 400% augmentation of the FAFL interval series (90.24% sensitivity, 49.50% specificity, and 76.88% accuracy) in the LOG classifier. The variation of consecutive P-wave intervals has been shown as an effective concept that differentiates FAFL from MAFL through the 12-lead surface ECG.


Introduction
Atrial futter (AFL) is a common type of supraventricular tachycardia (SVT). Based on population studies, it is estimated that there will be annually 200,000 new AFL cases in the US alone [1]. AFL arrhythmia is characterized by electrical signals that regularly propagate along various conduction pathways within the myocardial tissue with self-sustaining mechanisms [2]. Recurrent sustained AFL can lead to signifcant symptoms such as palpitations, fatigue, syncope, stroke, and even heart attack.
Atrial futter can be classifed into two diferent mechanisms, that is, focal AFL (FAFL) and macroreentry AFL (MAFL) according to the characteristics of the conduction propagation [3]. FAFL starts from a single spot, while MAFL is a process that circles a signifcant obstacle (see Figure 1 for an illustration).
An efective invasive treatment for AFL is radiofrequency catheter ablation (RFCA). It aims to create a conduction barrier to block the reentry of the loop or to destroy ectopic pacemakers. In addition, the list of abbreviations is given in Table 1. During the procedure, intracardiac electrocardiograms, pacing maneuvers, and isochrone mapping are used to characterize the AFL mechanism during RFCA treatment [2,4,5]. Tis can only be performed once the catheters are introduced into the heart.
Although RFCA is preferred for AFL treatment due to its efcacy, its signifcant dependence on the electrophysiology study makes it a time-consuming and laborious treatment. Terefore, its efcacy can be improved before going under any invasive procedure if the characteristics of AFL (e.g., its mechanism) can be identifed from some noninvasive techniques. Te noninvasive 12-lead surface ECG is mostly used in clinical detection to diferentiate the AFL from atrial fbrillation or normal ECG [6]. Te noninvasive diferentiation of the AFL mechanisms through 12-lead ECG would help clarify the ablation strategy and reduce the required time and resources in invasive cardiac mapping. However, it has been pointed out that diferentiating AFL mechanisms from surface ECG can be a difcult task [7].
Previous attempts are highly dependent on delineation [8] and morphology [3,9,10] of atrial waves to discriminate the AFL mechanism through 12-lead surface ECG. Recently, the recurrence quantifcation analysis (RQA)-based model has been used to distinguish AFL mechanisms from a synthetically generated ECG dataset based on a computational model [11,12]. Moreover, the authors highlighted the differences in ECG features of FAFL and MAFL.
Classifers are tailored to diferentiate two or many classes using advanced data processing techniques. Teir hyperparameters are typically tuned by minimizing some cost function based on a set of given data. However, it most frequently disregards the issue of class prevalence. When the classes are imbalanced (one class more prevalent than others), the classifer's decisions favor the majority class [13,14]. Tis afects the classifer's performance, and hence the resulting diagnosis. In medical science, datasets are often imbalanced due to, e.g., rarity of the disease, difculty in obtaining data, or time and money constraints.
In this study, we propose a classifer model for discriminating the AFL mechanism using peak-to-peak successive atrial activities of 12-lead surface ECG through linear classifers. Furthermore, the feature extraction of the proposed model is independent of the delineation and morphology of atrial activities.
Due to the class imbalance present in our working dataset, several data augmentation techniques have been used to counteract this. Te synthetic minority oversampling technique (SMOTE) [15] is used widely in diferent felds that create synthetic samples from minority classes to balance the dataset and minimize bias, e.g., article [16]. However, SMOTE has been shown to shrink the variance of the original dataset and introduce correlation between samples [17]. In this study, we also propose a theoretical modifcation to the original algorithm in order to correct the shrunken variance issue.
Te contribution made by the authors in this article is highlighted as follows: (i) methodological improvements to correct the variance shrinkage in classical SMOTE, (ii) a method to parametrize the generation of synthetic P-P intervals in terms of real data, (iii) a novel classifer to diferentiate focal from macroreentrant AFL, and (iv) selection of several relevant features that discriminate FAFL from MAFL.
Te organization of this article is outlined here. Section 2 describes the preprocessing of raw data after collection from the hospital and further elaborates on the hypothesis idea. Diferent standard data augmentation techniques and data generation protocols are explained as feature extraction and selection methodologies. Section 3 reports the results of data augmentation technique validation to identify the best augmentation rate. Section 4 discusses the results obtained in the section on the classifcation results before and after augmentation and the selection of relevant features. Section 5 concludes the article.

Data Acquisition and Preprocessing.
Te 61 patients who took part in this study were all under consideration for AFL ablation between January and December 2017 and were registered in a French hospital in Monaco, known as the Centre Hospitalier Princesse Grace. Te patients' demography with collection parameters is summarized in Table 2.  All ECGs were obtained during the ablation process using the acquisition system (Boston Scientifc, USA). Te ECGs were obtained using nine electrodes that were placed on the surface of the body. In contrast, the sampling frequency of the system was set to 2 kHz. Te quantization level, which served as the analog to digital conversion resolution, was set to 16 bits. A supine angle was kept the same for all the patients on the surgical table.
In electrophysiological investigations conducted during the ablation procedure, mapping maneuvers establish the target for the ablated source, which distinguishes between the AFL mechanism and other mechanisms, enabling the accurate determination of the ablation spot. Te report is made after the ablation. It provides information about the patient's condition, the AFL, the circuit, the orientation, and the direction of the circuit, among other things, which have been used as the ground truth in this study.
Consecutive P-waves are required in this study. Te ratio between atria and ventricle conduction must be sufciently large in order to identify these waves, hence we do not include ECGs whose conduction ratio is less than or equal to 2 : 1. Terefore, a limitation ratio is required between atria and ventricles to avoid nonconsecutive issues. With all these limitations, 5 FAFL and 41 MAFL valid records were obtained. Tese ECGs were then bandpass fltered (passband � [3 : 40] Hz) using two-stage high-pass and low-pass flters with a Chebyshev type II structure. A notch flter at 50 Hz is also used to remove powerline interference. Te overall methodology of the proposed research structure is arranged in Figure 2, which can be clearly understood as the novel method used for discrimination of the AFL mechanism.

Calculating the Intervals of Consecutive P-Waves.
Atrial futter can be characterized by electrical signals that repeatedly propagate along various physiological pathways [2,18]. Macroreentrant and focal AFL have very diferent activation patterns in the endocardium. One is in the form of a stable reentrant loop, and the other is a point source from which depolarization originates and propagates throughout the entire atrial structure. As shown in Figure 1, the depolarization wavefront patterns in the two mechanisms are quite diferent. On one hand, it is expected that in MAFL, the stable circuit produces a stable ECG pattern without much variation. On the other hand, centrifugal depolarization in FAFL cannot guarantee that similar paths will be encountered by the wavefront. Tis instability will translate into varying ECG patterns.
It is hypothesized that the mechanism of AFL can be diferentiated from 12-lead surface ECG based on the cycle length variability of the visible consecutive atrial activities (i.e., two or more than two P-waves within R-R interval). Notably, the intervals between P-wave peaks are hypothesized to be more variable in FAFL than in MAFL.
For each record, the lead containing the largest R-wave energy is selected, and the peaks of atrial activities (Pwaves) have been identifed by the GLRT method [19]. As shown in Figure 3, intervals between each P-wave have been measured and collected as a series. P-waves overlapped with T-waves have also been considered in this study and are estimated using the least square polynomial estimation [20]. Next, intervals above 300 ms are removed from the series, to ensure that false intervals not related to consecutive P-waves are removed. In total, 444 and 2546 intervals were obtained from 5 focal and 41 macroreentrant AFL ECGs, respectively.

Synthetic Data Augmentation for Balancing.
Te current dataset presents a heavily imbalanced class ratio of about 8 : 1 for MAFL against FAFL. One can expect the results to be biased towards MAFL (the majority class). Various kinds of data augmentation techniques have been proposed to overcome the imbalance issues present [21]. Tis study proposes a comparative study among three such techniques to conclude on which one is the best for the considered scenario. Tese techniques are SMOTE [15,22], modifed-SMOTE, and smoothed-bootstrap. Te input to be augmented is the series of P-P intervals.

SMOTE.
Te main idea of SMOTE is to generate new synthetic interval data based on the linear combination of two interval data X j th Interval and X k j th Interval where the latter is one of the k-nearest neighbors of the former. Te synthetic data is then an interpolation within the sample space in a defned neighbourhood. Te new synthetic interval is defned as where S J th Interval is the synthetic interval and α is a random number belonging to [0, 1]. Te result is a synthetic interval data that is randomly generated along the line between X J th Interval and X k J th Interval . In our scenario, we consider the neighborhood to encompass the totality of the dataset instead of a local neighborhood (i.e., k � N − 1 assuming there are N examples in the dataset).

Modifed-SMOTE.
Some theoretical properties of SMOTE for high-dimensional in-class imbalanced data have been discussed in [17]. One such property is that the synthetic samples have the same mean as the original dataset, but its variance is shrunk by a factor of 2/3. To counteract the shrunken variance, we propose the following modifcation to (1): Computational Intelligence and Neuroscience where all the terms are as defned previously. Te additional coefcient 3/2 reexpands the variance of the newly augmented data to match the original dataset. Te complete derivation and concept have been derived in Appendix (A.1). Te pseudocode for the algorithm of modifed-SMOTE is shown in Algorithm 1.

Smoothed-Bootstrap.
Te bootstrap is a conventional method based on resampling with replacement from a conveniently small dataset to construct bootstrap datasets. Tese derived datasets serve to estimate diferent functionals of the original distribution. However, the bootstrap distributions are typically discrete. For example, the cumulative distribution function of the classic bootstrap is where θ is the Heaviside step function or unit step function, X is the distribution value of the minority class, and N B is the size of the bootstrap dataset. Smoothed-bootstrap allows to smoothen the distribution and renders it continuous. First, the original points are randomly shifted before every resampling [23]. A specially chosen continuous kernel function f j is used as follows: and thus it renders the distribution continuous. Data points can then be sampled from this distribution. In this research, a nonparametric kernel density function is used. Figure 4 to generate synthetic data. Te interval series of each ECG record were used. For each original interval series, an interval is randomly selected and used to generate a synthetic interval, based on the three algorithms. Te process is repeated until the number of synthetic intervals matches that of the current original interval series. Tis is then repeated for all FAFL ECG records until the desired augmentation rate is achieved (e.g., 200% augmentation rate means each of the fve FAFL ECG record generates two synthetic interval series, for a total of 10 synthetic interval series).  It is known that misuse of data augmentation can lead to biased performance as synthetic samples introduce nonnatural qualities (e.g., correlation). It is then a question about how much synthetic data one should introduce. To analyze the efect of augmentation on classifer performance as well as on the best augmentation rate, this study considers rates from 100% (twice the size of the original dataset) until 800% (9 × the size of the original dataset) in steps of 100%. Note that at an 800% oversample rate, the minority class becomes exactly balanced with the majority class.

Input:
(1) Data of minority class (1) Find out the k-nearest neighbour from minority dataset of  Computational Intelligence and Neuroscience 2.5. Feature Extraction. Te characteristic features describing the interval series have been divided into the following four categories concerning the data: central tendency, dispersion, shape, and length. A total of 10 features were considered and is summarized in Table 3. Due to the diference in mechanism, it is expected that FAFL and MAFL would display diferent values for these features.

Feature Selection Method and Classifers.
Feature selection aims to avoid issues due to large complexity classifer models (e.g., overftting and cost inefectiveness) and improve its performance by selecting only relevant features. We consider in this study two approaches to feature selection, that is, (1) the flter method, using Wilcoxon's rank-sum test to determine the signifcant diference in data medians, and (2) the wrapper method, by evaluating all possible feature combinations (1023 combinations) and determining, for each feature, the feature score. Te score is determined as follows: For every combination length (e.g., single feature and pair of features), a score of 1 is assigned to a feature if it was found to participate in the combination with the maximum accuracy, for that particular combination length. Te scores for all combination lengths are added and normalized by the number of features available. Relevant features are those whose scores are closest to 1, and vice versa. Te algorithm of both the flter method and the wrapper method is shown in the form of pseudocode in Algorithm 2. Te wrapper method allows the evaluation of the relevancy on combinations of features and accounts for possible interactions amongst them, in contrast to the flter, which can only evaluate features one by one.
Tree linear classifcation models: Linear Discriminant Analysis (LDA), Logistic Regression (LOG), and Support Vector Machine (SVM) have been used. Note that nonlinear classifers have not been considered to avoid further issues related to overftting due to the scarcity of data.

Validation of the Data Augmentation.
Te original minority class distribution has been used to generate synthetic and augmented distribution using three diferent data augmentation techniques. Te comparison has been simplifed into the following four tests for validation. For each of these tests, 100 augmented datasets were generated for each augmentation rate (i.e., 100% to 800%), and the test results were averaged. Unless otherwise stated, the augmentation rate is fxed to the best rate, which is 400%. However, the impact of data augmentation from the minority class of fve focal ECGs (in terms of intervals) in eight equal steps is demonstrated in Appendix B Figures 5-7.

Graphical Exploratory Analysis (CDF and Boxplot).
Te average empirical cumulative distribution function (CDF) is shown in Figure 8 for all three augmentation techniques. Te original empirical CDF is shown for comparison. Te bin size was set to 5 ms arbitrarily. All three techniques correctly follow the original pattern. Smoothedbootstrap follows the original CDF most closely. Modifed-SMOTE and SMOTE present some skewness in the range from 180 ms to 205 ms. However, modifed-SMOTE presents less skew compared to SMOTE. Figure 9 shows the average box plot for all three techniques along with its original focal intervals. It has been observed that the central quartile (50%, median) of all three augmentation techniques has the same value as each other and is relatively close to the original dataset. As a quantitative comparison, the median diference in quartile values between the original and each of the three augmented datasets is calculated and summarized in Table 4. Te difference in all augmented dataset medians with the original is very small. However, modifed-SMOTE has been found to match the original regarding upper and lower quartile ranges (75% and 25%). Tis shows that modifed-SMOTE is a better technique.

Nongraphical Exploratory Analysis (Descriptive Statistics and the Goodness-of-Fit Test). Te Kolmogorov F02D
Smirnov goodness-of-ft test has been used to measure the degree of disagreement between the empirical CDFs of the original and augmented datasets. Te p value of this test was taken as a measure of similarity (higher values theoretically mean higher similarity). Figure 10 summarizes the statistics of the p values. Modifed-SMOTE had the largest p value (0.64 ± 0.12), suggesting a very high distribution similarity to the original. SMOTE and smoothed-bootstrap have significantly smaller values than this, with smoothed-bootstrap being the smallest (average 0.26 ± 0.07 vs. 0.16 ± 0.09).

Computational Intelligence and Neuroscience
Finally, three descriptive statistics, namely, (1) mean, (2) variance, and (3) skewness of the augmented dataset were compared to the original. Te diference between original and augmented dataset statistics was calculated and shown in Table 5 as percentages of the original value. Te minimum diferences are marked in bold font. It can be observed that smoothed-bootstrap has replicated the closest variance and skewness to the original dataset, whereas modifed-SMOTE has the minimum diference in the mean only. Figure 11 shows the maximum performance in terms of specifcity of the three classifers, for each feature combination length. Te ideal rate would be the one that maximizes accuracy, sensitivity, and specifcity (considering MAFL as the target class). However, under difcult conditions such as heavy class imbalance, these measures have to be considered carefully. Since the imbalance here afects the negative class (i.e., FAFL), we propose to trade of better specifcity against lower sensitivity.

Selection of the Best Augmentation Rate.
To identify the best augmentation rate, the average curve of all augmentation rates was calculated for each feature combination length. Te augmentation rate, whose curve has the minimum overall distance from the average curve was chosen as the best augmentation rate. Te best rate is shown in red dashed lines in Figure 11 (referring to the right axis). It is observed that the best rate is not uniform across the diferent combination lengths. It is primarily stable between 400% and 600%. We have selected a lower range of 400% as the best augmentation rate to prefer the minimum synthetic ratio compared to 500% and 600%.

Performance Evaluation by Linear Classifers for Best
Oversampling Rate. Tree linear classifers LDA, LOG, and SVM, and their performances are shown in Figures 11 and  12. One common behavior is that the specifcity has increased with an imbalance reduction between FAFL and MAFL. Contrarily, sensitivity, and accuracy decreased with increasing augmentation rate.
Te maximum performance at 400% augmentation is summarized in Table 6 and shown in Figure 12. Te LOG classifer has the highest performance among the linear classifers, with mean values of 76.13%, 41.42%, and 93.76% for

Discussion
Te 12-lead surface ECG remains a staple tool for heart disease diagnosis. However, it is rarely used for AFL mechanism diagnosis. On the other hand, it is widely used to distinguish AFL from atrial fbrillation [6]. Te proposed methodology thus represents a contribution in the use of 12lead ECG as a tool for AFL mechanism discrimination. Tis in turn allows clinicians to have an early insight into the ablation strategy, thus economizing time and resources. Tree classifers LDA, LOG, and SVM, have been used to evaluate the performance of the original dataset. Te accuracy, specifcity, and sensitivity obtained are 91%, 17%, and 100%, respectively, for the logistic regression classifer, with similar results for two other linear classifers. It has been observed that the specifcity in all three classifers exhibited abysmal performance (< 20%). Tis was caused by the heavy class imbalance where there was a 1 : 8 ratio of focal AFL to macroreentry AFL data record. Classifer bias on the majority class cannot be avoided. Terefore, data augmentation techniques were used to minimize the imbalance. At 400% augmentation, the LOG classifer achieved an accuracy, specifcity, and sensitivity of 76%, 40%, and 94%, respectively.
Te augmentation here does not serve to "improve" the classifer performance: rather, the focus was to "regularize" the obvious bias due to imbalance. It can be seen that despite a drop in overall accuracy, sensitivity did not drop significantly and yet specifcity increased more than twice. Tis suggests that the use of augmentation helps to estimate the correct performance in regard to classifying focal AFL.

Validation of the Data Augmentation.
Te results of all four tests of data validation are summarized in Table 9. It is initially difcult to identify the uniformly best technique since all three techniques have competing ranks. However, modifed-SMOTE has never been listed as rank 3. Terefore, it can be suggested that modifed-SMOTE is overall a better technique for data augmentation among the proposed three techniques.
It can be seen in Table 5 that modifed-SMOTE produces datasets with generally less variance compared to SMOTE, as suggested in Appendix A. Te issue of variance shrinkage was highlighted by Blagus and Lusa [17], but no solution was proposed. Our original contribution here produces a general tool for generating a new dataset with similar frst-order and   second-order moments to the original dataset. It can be helpful for other researchers in handling imbalanced datasets, which is a real problem in the biomedical feld.

Selection of Relevant Features.
Te relevant features that diferentiate the mechanism of AFL with the highest performance at 400% augmentation have been extracted from two diferent feature selection methods. Te results of the flter method and the wrapper approach are already shown in Table 8. It is challenging to decide the relevant feature with a single method since many feature subsets have scored more signifcantly than the arbitrary threshold of 0.8. Contrarily, it is simple to decide the relevant features in the flter method as only one is signifcant. However, this method compares single features and ignores dependencies. One solution is to compare the two methods to conclude on feature relevance. According to this, three relevant features are highlighted (in order of decreasing relevance): F10: sum of all consecutive intervals, F8: the minimum diference between consecutive P-wave intervals, and F5: variance.
A peak-to-peak interval of two consecutive P-waves contains two temporal information, that is, the P-wave duration, defned as the time length from its onset until its end, and the isoelectric line duration. Hence, there is an infuence of P-wave morphology in our measured P-P interval. Terefore, the variation in both P-wave and isoelectric line duration, due to conduction path variability, contributes both to the diferentiation of focal and macroreentrant AFL. Te sum of all consecutive intervals (F10) has been selected as the relevant feature based on this hypothetical phenomenon, and it has been found to be diferent for focal AFL from macroreentrant AFL (22.77 ± 12.13 vs. 14.15 ± 10.57, respectively, p < 0.05). Furthermore, the minimum peak-to-peak interval length (F8) discriminated the AFL mechanism based on fast and slow conduction velocity (393.68 ± 54.51 vs. 424.63 ± 74.48, respectively).
In summary, the sum of all consecutive intervals is the relevant feature to discriminate the mechanism. Finally, the acceptance of our study's hypothesis about the futter mechanism has also led to the conclusion that the variable feature is a more relevant subset for distinguishing the atrial futter mechanism.

Performance Evaluation by Linear Classifers.
It has been concluded from the previous section that the bestaugmented ratio is 400%, and the modifed-SMOTE is the appropriate technique for augmentation. Terefore, the performance of the proposed method has been conducted at 400% of the modifed-SMOTE by using fve-fold crossvalidation. Its results are shown in Table 10 concerning accuracy, specifcity, and sensitivity. Tese results validate that the consecutive intervals of P-P peaks are the signifcant factors for the discrimination of the AFL mechanism from 12-lead surface ECG.     [3]. Tey have briefy explained the tachycardia mechanism concerning mapping, transient entrainment, and ECG pattern. According to them, during AT, the presence of isoelectric lines indicates the presence of underlying focal mechanisms in a vast majority of patients. In contrast, the lack of isoelectric lines indicates the presence of macroreentry mechanisms in a vast majority of patients during AT. Importantly, it is also possible to observe isoelectric lines in macroreentry, however, only if signifcant atrial scarring is present. Tis statement paves the way for researchers in focal and macroreentrant atrial futter cases. An extensively wide study is focused on isoelectric intervals in discriminating the focal from macroreentrant by invasive and noninvasive procedures. However, limited research was found in noninvasive mechanisms for discrimination of the AFL mechanism, especially the 12-lead surface ECG, discussed here and it is summarized in Table 11. Two methods for discriminating focal from macroreentrant atrial futter were proposed by Brown et al. [8]. First, the P-wave duration of the focal should be less than 160 ms (accuracy, 80%), and second, the ratio of P-wave duration to tachycardia cycle length should be less than 45% (accuracy, 95%). Tis model is highly dependent on the delineation of atrial activities to calculate the cycle length of each P-wave, which requires a high signal processing technique. In contrast, our results were measured from the proposed consecutive Pwaves, which were measured from the atrial activity peaks within the R-R intervals. Terefore, the proposed model keeps safe from the advanced signal processing and discriminates the atrial futter mechanism without requiring the delineation of atrial activities (specifcity, 76.88%). Moreover, the original dataset percentage ratio between macroreentrant and focal was 65 : 35, whereas in our study case, it was 89 :11. After augmentation it became 67 : 33.
Tree relevant features were extracted by Chang et al. [10] based on PWM (P-wave morphology): lower voltage in macroreentrant as compared with focal (1.3 ± 0.3 vs. 1.5 ± 0.2 mV, pp � 0.02); high incidence of the positive polarity of lead V6 in focal (88% vs. 55%, p � 0.03); and longer cycle length in focal (296 ± 107 vs. 224 ± 25 ms, p p � 0.01). Tis case was performed experimentally based on a retrospective analysis and, similarly, required advanced signal processing for morphological analysis of atrial activities. In contrast, the proposed model is directly independent of the delineation and morphology of atrial activities. However, our proposed model includes the cycle length of atrial activity and isoelectric interval without advanced signal processing into the measured consecutive P-P interval within the R-R interval. In detail, the consecutive P-P interval has three pieces of information, such as (i) the approximate second half cycle of the frst P-wave, (ii) is the isoelectric interval between consecutive p-waves, and (iii) approximately the frst half cycle of the second P-wave. We identifed the sum of all consecutive intervals (F10) as a relevant feature extracted from our proposed model, which discriminates between focal and macroreentrant AFL (22.77 ± 12.13 vs. 14.15 ± 10.57), respectively.
Recently, a study generated synthetic datasets through eight torso models using twenty diferent original AFL mechanisms [11,12]. Tey produced 1,256 sets of 12-lead ECG records through a forwarding solution. Furthermore, six RQA-based characteristics were retrieved using two approaches, revealing that a 12-lead surface ECG can characterize the diferentiation between FAFL and MAFL. With this in mind, we have generated synthetic ECG intervals from the available minority dataset, which contains non-CTI-based left and right circuits. We generated ECGs in the feature space (consecutive P-P interval) instead of the standard time domain because oversampling techniques used in this model worked in feature space. Our results show that at the best-oversampling rate, the minimum P-P interval length (F8) discriminates the AFL mechanism based on fast and slow conduction velocity (393.68 ± 54.54 vs. 424.63 ± 74.48, respectively).

Limitation and Future Works.
Tis study is based on the variation of intervals between two consecutive atrial activities. At least two atrial activities must be visibly present between the ventricle activity in the ECG. In terms of ratio, it can also be said that the ratio of atrial and ventricle activity must be greater than 2 : 1. Tis criterion is oftentimes strict and renders the data collection a burdensome task. Te selection of a maximum delay between the two P-waves is based on assumptions. It should ideally be set after consultation with several electrophysiologists since slower rates can be observed. Further clinical data should be added to handle the imbalance issue in the study dataset.   In this study, the modifcation of the SMOTE algorithm for correcting variance shrinkage was performed, assuming that the random multiplier α was drawn from a uniform distribution of the modifed range. Tis was proven to theoretically preserve the original moments of the data distribution up to the second moment. It is an open question about what other distributions may be considered to preserve other data properties. Tis research can also be extended by exploring more valuable classifers after balancing the dataset with new samples as future work.
Te proposed modifed-SMOTE was evaluated on two diferent mechanisms to validate the modifcation. First, we have theoretically proven the concept of the modifcation of the classical SMOTE. Ten, we performed a comparative analysis of the modifed algorithm, classical algorithm, and other oversampling techniques on the real dataset. However, the performance of modifed-SMOTE should be analyzed on public datasets to compare and validate its results with other kinds of SMOTE modifcation.

Conclusion
Tis noninvasive study helps identify the AFL mechanism using 12-lead surface ECG, which allows insight into the disease before the catheter ablation procedure. Consecutive intervals of P-waves are hypothesized to contain crucial information regarding the AFL mechanism. Our fndings indicate that they are helpful in the discrimination of focal AFL and macroreentry AFL, which does not rely on advanced signal processing such as the measure of the delineation, onset, and ofset of the atrial waves. Tis study has also applied several data augmentation strategies to cure class imbalance in the original dataset. Based on a classical algorithm, a novel augmentation method (modifed-SMOTE) was modifed to correct a theoretical issue present in the original algorithm.
Tree linear classifers have been used to discriminate against the AFL mechanism. At the best augmentation rate of 400%, the logistic regression classifer achieved an average sensitivity, specifcity, and accuracy of 90.24%, 49.5%, and 76.88%, respectively. It was concluded that the sum of all consecutive atrial activities is a relevant feature to diferentiate the AFL mechanism.