Participants
We retrospectively selected a total 1341 patients with AF from two University Hospitals: 741 from Severance Hospital, Seoul, South Korea and 600 from Ewha University Hospital, Seoul, South Korea from January 2008 to December 2017 (eFigure 1, Supplement). This study was approved by the Institutional Review Boards of Severance Hospital (IRB number: 2017–2301-002) and Ewha University (IRB number: 2017–10-010–002). At the enrollment stage, all patient demonstrated atrial fibrillation on ECG.
Training/validation cohort
We included 741 patients with AF at Severance Hospital, Seoul, South Korea. We collected 10 seconds of surface 12-lead ECGs, which was recorded digitally before any treatments of AF including cardioversion or catheter ablation. Patients had no history of anti-arrhythmic medication within 14 days before ECG. The exclusion criteria include patients with past medical history of (1) valve disease or valve surgery, (2) coronary bypass surgery, or (3) structural heart disease. No technical exclusion criteria were included in order to guarantee stability of our algorithm.
Test cohort
We validated the predictive value of our model with an independent test cohort. The test cohort consisted of 600 patients with AF at Ewha University school of Medicine, Seoul, South Korea. The ECG acquisition process and exclusion criteria were identical to those of the training/validation cohort.
Definition of Atrial Fibrillation classification
AF was diagnosed if AF was detected on ECG obtained from outpatient’s clinic or Holter reports according to guidelines [4]. Then, AF is classified into Paroxysmal, persistent, or long-standing atrial fibrillation by the ACC/AHA/ESC guideline [4]. Persistent or long-standing atrial fibrillation is defined as Non-PAF.
Baseline characteristics and echocardiographic parameters
Baseline characteristics and echocardiographic parameters were extracted electronically from each patients’ EMR (electrical medical record). The baseline characteristics were: CHA2DS2-VASc Score [4], age, sex assigned at birth, and history of congestive heart failure, hypertension, diabetes mellitus, stroke or TIA, and/or vascular disease. At the point of AF diagnosis, each patient was assessed by echocardiogram to assess the heart anatomy including Left atrium (LA) volume, Left Ventricle anterior–posterior (AP) diameter, and Left Ventricle Ejection fraction.
Electrocardiogram (ECG)
In contrast to previous research using 24 hours Holter ECG [7,8,9], our analysis relies on only 10 seconds of routine 12-lead surface ECG. Temporal analysis [7, 8, 10, 11], frequency analysis [8, 9, 12, 13] or both [14,15,16,17,18,19,20] were considered to quantify AF global organization of ECG (eMtehod, Supplement). It was analyzed using conventional ECG parameters including Fibrillatory Wave Amplitude (FWA) [7, 14, 18, 20], Sample Entropy [8, 10, 11, 14, 17, 19, 21], Dominant Frequency [8, 9, 14, 18, 20], Spectral Entropy [16, 17, 19, 20] and Organization Index [13, 20]. Here, we propose the Spectral Power Ratio (SPR), the ratio of the power distribution in a lower frequency range versus a higher frequency range, calculated as
$$SPR_{i} = \frac{{\int_{f}^{\infty } {p(f)df} }}{{\int_{0}^{f} {p(f)df} }}$$
where fi is the cut-off value to divide the power into a lower frequency range versus a higher frequency range for the i-th lead (eFigure 2, Supplement). An initial value of fi was set as 10 Hz and updated during the training process.
Obtaining raw ECG data
Surface 12-Lead ECGs were recorded digitally with a 250 or 500 Hz sampling frequency using an electrophysiology recording system (GE Healthcare, Marquette, MAC5500, Waukesha, WI). ECG recording was composed of 10 s ECG data. The data were exported from the recording system to XML format and converted into CSV data file through a custom Python program.
ECG preprocessing
ECG recordings were preprocessed to reduce noise and interference for analysis of fibrillatory wave. All signal was upsampled to 1000 Hz for enhancing time alignment accuracy for later QRST complex subtraction [22]. Pan Tompkins algorithm was applied for automatic QRS detection using Butterworth bandpass filter (order: 3) [23, 24]. To avoid baseline wandering [25], high frequency noise [26] and possible powerline interference [27], ECG signal was filtered by band-pass filter between 1 and 50 Hz (6 order Chebyshev, type 2, 20-dB stop-band attenuation). Ventricular signal was cancelled by adaptive singular value QRST cancellation [28, 29]. This method forms a matrix having multiple columns composed of QRST signal, and applies Singular Value Decomposition [30] to extract an eigen-vector of the matrix for QRST templates. Then, the template is multiplied by an adaptive coefficient, and subtracted. After QRST cancellation, the signal was filtered by an additional 3 Hz high-pass filter to suppress interference caused by possible residual T wave [31].
Statistical analysis and prediction model based on machine learning
Continuous variables were reported as the mean ± the standard deviation, whereas categorical variables were reported as frequencies (percentages). Pearson Chi-square tests were applied for categorical variables, while Wilcoxon tests were used for continuous variables.
The machine learning algorithm was trained on the training/validation cohort. As the primary analysis, the ML model was trained on only ECG parameters from 12 lead. As the secondary analysis, the ML model was trained on (1) ECG parameters from 12 leads, (2) baseline characteristics, and (3) echocardiographic parameters.
Least absolute shrinkage and selection operator (LASSO) regression was applied to fit the β coefficients of the predictive models [32]. Ten-fold cross-validation was performed on the training/validation cohort. The maximum number of nonzero coefficients of the lasso coefficients was 25; the maximum number of iterations was 1000; and the convergence threshold of the coordinate descent algorithm was 0.0001. Each numeric variable was standardized with zero mean and unit standard deviation.
The predictive model was evaluated in terms of the Area Under Curve (AUC) of the Receiver Operating Characteristic (ROC) curve using an independent test cohort. In addition, the calibration curve and its c-index were evaluated. For univariate and multivariate analysis, logistic regression was performed by using a limited number of variables selected by the Lasso regression for the predictive model. For univariate and multivariate analysis, all continuous variables were dichomatized into binary values (low vs. high) using the median as the cut-off value. All hypothesis tests were 2-sided, and a 2-sided p < 0.05 indicated statistical significance. Calculations were performed using MATLAB 2019 (Mathworks, CA) and SAS version 9.3. Figure 1 provides an overview of our machine learning model that was built using ECG parameters from 12-lead surface ECG, baseline characteristics, and echocardiographic parameters.