Prediction of breath‐holding spells based on electrocardiographic parameters using machine‐learning model

Abstract Background Breath‐holding spells (BHS) are common in infancy and early childhood and may appear like seizures. Factors such as autonomic dysfunction and iron deficiency anemia are thought to contribute to the incidence of BHS. In this study, electrocardiographic (ECG) parameters of patients with BHS were compared to those of healthy, normal children. Logistic regression and machine‐learning (ML) models were then created to predict these spells based on ECG characteristics. Methods In this case–control study, 52 BHS children have included as the case and 150 healthy children as the control group. ECG was taken from all children along with clinical examinations. Multivariate logistic regression model was used to predict BHS occurrence based on ECG parameters. ML model was trained and validated using the Gradient‐Boosting algorithm, in the R programming language. Results In BHS and control groups, the average age was 11.90 ± 6.63 and 11.33 ± 6.17 months, respectively (p = .58). Mean heart rate, PR interval, and QRS interval on ECGs did not differ significantly between the two groups. BHS patients had significantly higher QTc, QTd, TpTe, and TpTe/QT (all p‐values < .001). Evaluation of the ML model for prediction of BHS, fitting on the testing data showed AUC, specificity, and sensitivity of 0.94, 0.90, and 0.94 respectively. Conclusion There are repolarization changes in patients with BHS, as the QTc, QTd, TpTe, and TpTe/QT ratio were significantly higher in these patients, which might be noticeable for future arrhythmia occurrence. In this regard, we developed a successful ML model to predict the possibility of BHS in suspected subjects.


| INTRODUC TI ON
Breath-Holding spells (BHS) are recognized as paroxysmal non-epileptic events, which are seen in infants and young children, mostly between 6 months to 5 years of age (Breningstall, 1996;DiMario, 2001;Leung et al., 2019).It occurs in about 0.1-4.6% of otherwise healthy children (Esmaeili et al., 2019).The exact mechanism of BHS is not known well, but autonomic dysregulation, increased vagal tone, delayed myelination of the brain stem, and also iron deficiency anemia at these ages are considered potential causes (Anil et al., 2005;Leung et al., 2019;Mocan et al., 1999;Tomoum et al., 2018).Typically, BHS disappeared until the age of six, as after this age, the autonomic system of the child has become matured (Akpinar et al., 2019).The autonomic dysfunction could lead to severe bradycardia, ventricular asystole, and cerebral hypoxia, which eventually presented as these attacks.The spells always occur in awake times, start with a crying period, and are followed by prolonged expiration.Regarding skin color during attacks, BHSs are usually divided into two categories: pallid spells and cyanotic spells; the cyanotic spells are the more common type (Amoozgar et al., 2013;Laxdal et al., 1969).
Evaluation of BHS patients' electrocardiographic (ECG) features has revealed remarkable changes, particularly in the repolarization period (Akpinar et al., 2019).Some studies have shown increased QT dispersion in these patients compared to the normal population (Akalin et al., 2004;Yilmaz et al., 2014).In addition to the QT interval, other ECG parameters of the repolarization period including T-peak to T-end (TpTe) and T-peak to T-end dispersion (TpTe dis) have been shown to have a significant correlation with future arrhythmogenic events (Castro Hevia et al., 2006;Karadeniz, 2020), and one study recently showed these parameters are significantly increased among BHS individuals (Akpinar et al., 2019).
This study aimed to investigate the differences in ECG parameters between BHS cases and normal control populations, and then, to develop a machine-learning-based model to predict future breath-holding spells based on ECG parameters.

| Study design and patient enrollment
This case-control study enrolled a total of 202 subjects including 52 patients (25.7%) with an established diagnosis of BHS (cases), and 150 (74.3%) normal children without any history of BHS (controls).All of the subjects were collected from neurology and cardiology clinics of Mofid Children's Hospital, Tehran, Iran; from January 2020 to January 2021.All children with at least one breath-holding spell (including all forms of it), confirmed by a pediatric neurologist or cardiologist were enrolled in the study and included in the case group; while the subjects in the control group were selected randomly from children who attended their routine annual check-ups and were in good health during the examinations.They did not have any clinical issues at the time of the check-up.Exclusion criteria were the presence of any underlying cardiac disease or neurologic disorder, electrolyte imbalance, hypoglycemia, renal failure, consumption of any drugs for BHSs, or suspected BHS diagnosis.
All electrocardiographic parameters were measured by a pediatric cardiologist on a 12-lead ECG at rest, obtained using a cardiocare electrocardiography machine.QT interval measured from QRS initiation to the end of the T wave.PR interval was measured from the initial of the P wave to the peak of the R wave.On a surface ECG, the length of the QT interval corresponds to the duration of time required for all ventricular depolarization and repolarization events to take place.Heart rate is one of the most important parameters that affect the QT interval (Funck-Brentano & Jaillon, 1993), so we used the corrected QT interval (QTc) instead, to obviate the effect of heart rate.QTc interval was calculated using the Bazet formula (QTc = QT/√RR).QT dispersion (QTd) was determined as the difference between the largest and the shortest QTc.T-peak to T-end (TpTe) was calculated from the peak of the T wave to the end of it, where the wave returns to the isoelectric line.Eventually, the TpTe/QT ratio was also calculated using the TpTe and the QT measurements.

| Statistical analysis
Continuous quantitative variables are presented as mean and standard deviation, and the normality of distribution was calculated using the Kolmogrov-Smirnov test.Qualitative variables are illustrated as frequency percent.A comparison of quantitative and qualitative variables between the two groups was performed with the Student's T-test and the Chi-Square test.A multivariable logistic regression model was created to predict the breath-holding spells regarding all ECG parameters, and its performance results were compared with the machine learning model.All of the statistical analysis was done using the SPSS software (IBM, version 26).Statistical significance was determined as a p-value of less than .05.

| Logistic regression model
Logistic regression has been the most commonly used model for the estimation of an outcome variable in medical research projects when the outcome is categorical.Logistic Regression estimates the likelihood of a single outcome from a pair of potential outcomes (binary regression).This task is done by employing the logarithm of the odds (log-odds), and the prediction of the target variable's class (in our investigation, BHS not happening versus BHS happening) is determined according to this probability (LaValley, 2008).Eventually, we could evaluate the algorithm prediction function by fitting it to our data, determine its performance metrics, and compare them to our machine learning model performance.

| Machine-learning model development
To develop a model to predict future breath-holding spells based on ECG parameters, we used a supervised machine-learning method, named the "Gradient Boosting" (GB) model.For categorization issues, one popular machine-learning technique is the GB model.As a member of the ensemble method class, gradient boosting combines several models (referred to as "weak learners") to enhance their performance and create the best possible final model (Figure 1).
Equation ( 1) describes how a simple machine-learning model works (Zhang et al., 2019).This model tries to estimate a target variable (y) using a prediction function (F) and a set of independent features (X), but there is always an error (e), which is the difference between the predicted and the original value of target variable.
If this model is considered a weak learner, then there might be a correlation between E and y, which could be trained like Equation (2).
where e′ i is noise and has not any correlation with y.So, we can update Equation (1), as given below.
If we perform this task sequentially for N steps, Equation ( 4) would be the ultimate algorithm that the gradient boosting model utilizes to make its predictions.
Therefore, the GB model iteratively leverages the errors from previous steps to enhance its performance and accuracy.The decision tree model is typically the core of the weak learners.The GB model has recently become increasingly popular in analyzing healthcare data due to its excellent prediction accuracy compared to other machine-learning or conventional statistical methods.
The whole dataset (n = 202) was divided into three categories:

| RE SULTS
A total of 202 subjects consisting of 52 patients with a confirmed history of BHS and 150 healthy children (control group) were included in the study.The distribution of genders was statistically similar in each group, such that 37 (71.2%) and 110 (73.3%) were males for BHS and control groups, respectively (p = .857).Also, both groups were of the same age, and the mean age in BHS and control groups were 11.90 ± 6.63 and 11.33 ± 6.17 months old, respectively (p = .58).Electrocardiogram characteristics including the mean of heart rate, PR-interval, and QRS segment did not show a significant difference between the two groups.However, all electrocardiogram parts related to the repolarization period, including QTc, QTd, TpTe, and TpTe/QT, were significantly higher in BHS patients compared to normal healthy subjects (all with p < .001)(Table 1).
The Kernel Density Estimate plot (KDE plot) is an alternative method to the histogram, demonstrating the distribution of Gaussian density in the dataset regarding all features (Ghosh et al., 2006).As shown in Figure 2, four ECG parameters including TpTe/QT, QTc, QTd, and TpTe have remarkably different distributions between BHS and normal healthy groups, while other parameters such as PR interval and QRS duration have approximately similar distributions between the two groups.As we can see, these plots also highlight the same results of the univariate analysis as illustrated in Table 1.
We also performed a subgroup analysis of BHS patients regarding their attack types including cyanotic or pallor.Table 2 demonstrates the comparison of ECG parameters between these two types.There aren't any remarkable differences in PR, QRS, and QTc (1) The plot shows how an ideal Gradient Boosting model works, illustrating a gradual reduction in classification error with the inclusion of one decision tree in each iteration.The final model leverages the collective strength of all decision trees to make predictions.intervals, however, repolarization variables including QTd, TpTe, and TpTe/QT ratio are significantly higher among the pallid compared to the cyanotic type BHS patients.
A multivariable logistic regression model was used to predict spells with variables including age, sex, and all ECG features.Table 3 shows the details of each variable in the model, highlighting that the most important variable for the logistic regression model is QTc (p < .001).

| Machine learning model versus logistic regression model
To compare our two models, we employed standard parameters commonly used to assess the performance of prediction models.
These parameters include AUC, sensitivity, specificity, precision, recall, and the F-1 score.Table 4 depicts the performance metrics of the ML model versus the logistic regression (LR) model for the prediction of BHS occurrence regarding ECG parameters.The AUCs of the ROC plot (AUC-ROC) for the ML and LR models are 0.94 versus 0.81, respectively (Figure 3), with sensitivity and specificity of 0.94 and 0.90 for the ML and 0.69 and 0.94 for the LR models.
Furthermore, the overall accuracy of the ML model for predicting breath-holding spells based on ECG parameters is 0.91, while the accuracy of the LR model is 0.87; also, the F1 score that indicates the harmonic mean of the precision and recall indices of a classifier algorithm equals 0.87 and 0.74 respectively for ML and LR models.
Accordingly, we reached the conclusion that the ML model (Gradient Boosting method) is superior to the LR model in terms of the BHS prediction function.

| Feature importance
The previous metrics are essential for the evaluation of the model performance, but after the development of a verified and efficient model, we should determine the importance of each feature in the final prediction.SHAP summary plot is a method that helps us to make this task interpretable so that we can easily explain our model (Lubo-Robles et al., 2020).As shown in Figure 4, which is the SHAP summary plot of the ML model, the features are listed downward (on the y-axis) in order of their impact on the system decision making, and the x-axis is demonstrating their SHAP contribution for distinguishing the two groups.So, the most striking result to emerge from the SHAP plot of our model is that QTc, TpTe, QTd, and TpTe/QT, respectively, are the most powerful features the algorithm utilizes to predict its final results.

| DISCUSS ION
When dealing with high-dimensional correlations between features, machine-learning methods usually performs more efficiently than conventional methods in generating predictive models for medical datasets.In this study, we developed a highly efficient machinelearning model named Gradient Boosting model, to predict future breath-holding spells based on ECG parameters, with an AUC of 0.94 and an overall accuracy of 0.91.Moreover, we used the multivariable logistic regression model on our data to predict the BHS attacks.A comparison of these 2 models revealed that the ML model is superior to the LR model respecting its better overall performance metrics.
In this investigation, we demonstrated that the mean values of various repolarization ECG parameters, such as corrected QT, QT dispersion, TpTe, and the TpTe/QT ratio, are notably higher in the BHS group compared to the group of normal, healthy children.
Conversely, other parameters like heart rate, PR interval, and QRS duration did not exhibit any statistically significant differences between the two groups.Some studies have previously reported a correlation between QT dispersion (QTd), corrected QT dispersion (QTcd), and TpTe measurements with ventricular conduction disruptions, abnormal repolarization, and the occurrence of ventricular arrhythmias.(Castro-Torres, 2014;Jaromin et al., 2021;Kors et al., 2008;Wang et al., 2007).Akalin et al. studied 43 subjects with BHS and compared their ECG parameters with the control group consisting of 25 normal children, and concluded that QT interval and QTc had not a remarkable difference, while QT dispersion (QTd) and QTc dispersion (QTcd) were significantly higher in BHS compared to control group (59.5 ± 35.9 ms and 44.8 ± 11.9 ms, for QTd and 102.1 ± 41.9 ms and 79.6 ± 24.6 ms for QTcd, respectively, in BHS and control groups, p < .01 for both) (Akalin et al., 2004).In another study by Amoozgar et al., among QT dispersion, QTc dispersion, TpTe dispersion, and P wave dispersion, only QTc dispersion was significantly higher in the BHS group rather than the normal group (148.2 ± 33.1 ms vs. 132 ± 27.3 ms, p = .01)(Amoozgar et al., 2013).lead ECG of 56 BHS individuals and compared them with the normal healthy group.There was a significant difference between the patient and control groups in terms of QTd and QTcd (p < .001)(Movahedian et al., 2016).Kolkiran et al. investigated   sinus arrhythmia and asystole periods are more common during breath-holding spells, especially in pallid types, while there was no significant difference between BHS patients with the normal control group (26 healthy children) in terms of repolarization ECG parameters (including QT, QTc, QTd, QTcd).They eventually confirmed the presence of autonomic dysregulation in subjects with breath-holding spells (Kolkiran et al., 2005).
In a retrospective cohort study by Cosgun and colleagues, they surveyed 124 diabetic patients within two groups: no diabetic retinopathy (NDR) and diabetic retinopathy (DR), and demographic data along with ECG parameters were compared between the 2 groups.Among all features, TpTe and TpTe/QT were remarkably prolonged in the DR group compared to the NDR group.Furthermore, the multivariate logistic regression analysis revealed that TpTe (OR = 6.01, %95 CI = 4.17-7.52,p = .012),TpTe/ QT (OR = 1.215, 95% CI = 0.874-1.612,p = .029),and diabetes mellitus duration (OR = 1.422, 95% CI = 1.146-1.712,p < .001) were independent variables to predict DR occurrence.Eventually, they concluded that diabetic patients with concomitant retinopathy might be at a higher risk of sudden cardiac death because of increased ventricular arrhythmias risk in this group (COŞGUN et al., 2021).
In terms of the spell types, we concluded that QTd, TpTe, and TpTe/QT ratio were significantly higher among the pallid type group rather than patients with the cyanotic spells.Our results are consistent with most previous studies in the literature.DiMario et al.
compared these BHS types regarding their QTc and concluded that QTc is remarkably higher in pallid-type spells (DiMario, 2004).
Furthermore, Akalin and colleagues showed that the QTd and also QTcd are significantly higher in pallid and mixed-type patients compared to cyanotic-type subjects (Akalin et al., 2004).
This  Our study has some limitations.First, this survey was conducted as a single-center case-control study involving a limited population.
Increasing the size of our case group, comprised of BHS patients,

| CON CLUS ION
To the best of our knowledge, this is the first study for the devel-  F I G U R E 4 SHAP summary plot, representing all features used for system prediction, sorted by their impact on the decision-making process of the machine learning algorithm.The red and blue dots show each feature's direct and indirect impact on the final prediction, respectively.HR, heart rate; PR int, PR interval; QRS dur, QRS duration; QTc, Corrected QT; QTd, QT dispersion; TpTe, Interval from the peak of T wave to the end of T wave.
1. Training set (n = 106), 2. Validation set (n = 35), and 3. Testing set (n = 61).The training and the validation sets were used for the initial training and cross-validation of the model during the learning process, respectively.After this, the testing set (its data were not seen by the system during learning) was used to evaluate the prediction performance of the final model.Development of this model and further evaluations were done using the R programming language in the RStudio software environment (version 22), using the H 2 O machine-learning package and the grid-search method.

F
I G U R E 2 The Kernel Density Estimate (KDE) plots to compare the distribution of Gaussian density of different ECG parameters in BHS and normal children.PR int, PR interval; QRS dur, QRS duration; QTc, Corrected QT; QTd, QT dispersion; TpTe, Interval from the peak of T wave to the end of T wave.
study underscored the significance of ventricular repolarization abnormalities in individuals experiencing breath-holding attacks.Ventricular repolarization constitutes a critical phase in cardiac electrical activity, and even minor irregularities within this phase could pose a substantial risk for potentially fatal ventricular arrhythmias.The modulation of ventricular repolarization closely correlates with the autonomic nervous system function.As a child matures and the autonomic nervous system becomes more developed, the occurrence of repolarization disruptions decreases, leading to an improvement in breath-holding spells.BHS is typically considered a benign transient condition in childhood; Nevertheless, according to evidence from this study and former similar articles, the presence of noticeable repolarization disturbances in this particular group of children that could put the patients at a greater risk of lethal arrhythmias should be emphasized more in clinical practice and future research in this field.TA B L E 2 Comparison of the ECG parameters between Cyanotic versus Pallid type spells.
would likely enhance the algorithm's learning curve, thereby resulting in greater precision and improved final prediction accuracy.Second, the current study exclusively focused on analyzing ECG features among BHS patients, overlooking other potential factors that could contribute to predicting breath-holding spells in children.For instance, considering variables like iron-deficiency anemia in conjunction with ECG data could enhance the predictive capabilities of the model.The third limitation pertains to the absence of external validation for our developed model.While our model exhibited strong performance on our testing dataset, its robustness could be further established through validation on external, standard data obtained from a different medical center.This external validation would enhance the generalizability of the model to a broader population of BHS patients.
opment of a machine-learning model to predict the possibility of breath-holding spell occurrence in suspected children regarding their baseline ECG parameters.Based on our model, the most important features to distinguish BHS from the normal groups respectively were QTc, TpTe, QTd, and TpTe/QT.Further prospective works need to be carried out to confirm the results of our algorithm.AUTH O R CO NTR I B UTI O N S Conception and design: Tofighi S. Administrative support: Khalilian MR.Provision of study materials or patients: Nikkhah A and Attar EZ.Collection and assembly of data: Hajipour M and Ghazavi M. Data analysis and interpretation: Tofighi S. Manuscript writing: Tofighi S and Samimi S.

F
The receiver operating characteristic curve (ROC-curve) of the machine learning model after fitting it on the testing dataset.AUC, area under the curve.
Comparison of the ECG parameters between the two study groups.