Article Text

Download PDFPDF

Original research
Role for machine learning in sex-specific prediction of successful electrical cardioversion in atrial fibrillation?
  1. Nicklas Vinter1,2,
  2. Anne Sofie Frederiksen3,
  3. Andi Eie Albertsen3,
  4. Gregory Y H Lip4,
  5. Morten Fenger-Grøn5,
  6. Ludovic Trinquart6,
  7. Lars Frost1,2 and
  8. Dorthe Svenstrup Møller3
  1. 1Diagnostic Centre, Regionshospitalet Silkeborg, Silkeborg, Denmark
  2. 2Department of Clinical Medicine, Aarhus Universitet, Aarhus, Denmark
  3. 3Department of Cardiology, Viborg Regional Hospital, Viborg, Denmark
  4. 4Liverpool Centre for Cardiovascular Science, University of Liverpool, Liverpool, UK
  5. 5Research Unit for General Practice and Department of Public Health, Aarhus University, Aarhus C, Denmark
  6. 6Department of Biostatistics, Boston University, Boston, Massachusetts, USA
  1. Correspondence to Dr Nicklas Vinter; nicvin{at}rm.dk

Abstract

Objective Electrical cardioversion is frequently performed to restore sinus rhythm in patients with persistent atrial fibrillation (AF). However, AF recurs in many patients and identifying the patients who benefit from electrical cardioversion is difficult. The objective was to develop sex-specific prediction models for successful electrical cardioversion and assess the potential of machine learning methods in comparison with traditional logistic regression.

Methods In a retrospective cohort study, we examined several candidate predictors, including comorbidities, biochemistry, echocardiographic data, and medication. The outcome was successful cardioversion, defined as normal sinus rhythm immediately after the electrical cardioversion and no documented recurrence of AF within 3 months after. We used random forest and logistic regression models for sex-specific prediction.

Results The cohort comprised 332 female and 790 male patients with persistent AF who underwent electrical cardioversion. Cardioversion was successful in 44.9% of the women and 49.9% of the men. The prediction errors of the models were high for both women (41.0% for machine learning and 48.8% for logistic regression) and men (46.0% for machine learning and 44.8% for logistic regression). Discrimination was modest for both machine learning (0.59 for women and 0.56 for men) and logistic regression models (0.60 for women and 0.59 for men), although the models were well calibrated.

Conclusions Sex-specific machine learning and logistic regression models showed modest predictive performance for successful electrical cardioversion. Identifying patients who will benefit from cardioversion remains challenging in clinical practice. The high recurrence rate calls for thoroughly informed shared decision-making for electrical cardioversion.

  • atrial fibrillation
  • gender
  • statistics
http://creativecommons.org/licenses/by-nc/4.0/

This is an open access article distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited, appropriate credit is given, any changes made indicated, and the use is non-commercial. See: http://creativecommons.org/licenses/by-nc/4.0/.

Statistics from Altmetric.com

Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.

Key questions

What is already known about this subject?

  • No prediction tools that identifies patients with atrial fibrillation (AF) who may benefit from electrical cardioversion have been implemented in clinical practice. Accumulating evidence indicates that there are considerable sex differences in the epidemiology of AF. However, previous analyses have not accounted for the potential sex differences in prediction models.

What does this study add?

  • Our sex-specific prediction models based on machine learning and logistic regression demonstrated different clinically important predictors between sexes, but the models did not demonstrate improved predictive ability compared with other existing models.

How might this impact on clinical practice?

  • Identifying the patients who will benefit from cardioversion is a challenge in clinical practice. The high recurrence rate calls for thoroughly informed shared decision-making for electrical cardioversion.

Introduction

Atrial fibrillation (AF) is the most common sustained cardiac arrhythmia encountered in clinical practice. Electrical cardioversion is frequently performed to restore sinus rhythm and relieve symptoms in patients with persistent AF. Despite high rates of initial success of electrical cardioversion, more than half of the patients may have recurrence of AF within 1 year.1 2

Electrical cardioversion is resource demanding and carries risks of thromboembolism and anaesthesia-related complications, and therefore, development of prediction models for successful cardioversion would be useful to inform shared decisions. Several characteristics have been identified as predictors of AF recurrence, such as high age, female sex, long duration of AF, heart failure, large left atrial size, hypertension, elevated body mass index, ischaemic heart disease, and chronic kidney disease.2–4 However, the evidence of identification of patients who will benefit from cardioversion is weak and prediction of success is difficult in clinical practice.

Accumulating evidence indicates that there are considerable sex differences in the epidemiology of AF, presentation of AF, prognosis and in the response to antiarrhythmic therapy and radiofrequency ablation (RFA).5–8 As the existing literature has examined ‘general’ predictors of successful cardioversion in cohorts including both sexes, the analyses have not accounted for the potential sex differences in prediction models. Development of separate models in women and men may be warranted to improve predictive accuracy. However, traditional regression approaches do not accommodate complex interaction between patient characteristics, but machine learning methods may be a promising new approach that gains acceptance in cardiovascular medicine.9–11

Among patients with persistent AF, we aimed to develop sex-specific prediction models for successful electrical cardioversion and assess the potential of machine learning methods in comparison with traditional logistic regression.

Methods

Study population

We conducted a retrospective cohort study of consecutive patients diagnosed with persistent AF whose ongoing AF lasted for more than 48 hours or was of unknown duration. The patients were included with their first electrical cardioversion at Regional Hospital Central Jutland (Viborg Regional Hospital and Silkeborg Regional Hospital) in Denmark from August 2011 through March 2016. No exclusion criteria were applied. The criteria of 48 hours/unknown duration were applied because this cohort was originally established to examine use of oral anticoagulation and waiting time to electrical cardioversion.1 From electronic medical records, we systematically collected clinical and laboratory data and information on medical history. The study population comprised both patients with a history of cardioversion and patients who underwent their first cardioversion ever. The patients were followed in a structured multidisciplinary AF clinic and were treated with anticoagulation in accordance with the European clinical guidelines.12 Synchronised direct current electrical cardioversions were performed with paddles in anterior–posterior or anterior–lateral position. Energy levels ranged from 100 to 360 J using a biphasic defibrillator.

Candidate predictors

We used existing literature to select candidate predictors of successful cardioversion (table 1).2–4 We assessed all information on potential predictors before the cardioversion procedure. Heart rate was measured on the date of cardioversion. The definition of excessive use of alcohol was more than eight drinks per week. Hypertension was defined as a history of hypertension or ongoing antihypertensive medication, diabetes mellitus as haemoglobin A1c level ≥48 mmol/mol or ongoing antidiabetic medication, and chronic obstructive pulmonary disease (COPD) as a pulmonary function test with irreversible airflow limitation, expressed as a FEV1/FVC ratio <0.7 after bronchodilatation, or ongoing inhalation treatment consistent with COPD. Echocardiographic data included left ventricular ejection fraction and left atrial diameter measured from the parasternal long axis. Echocardiograms were considered valid if the examination was performed within a period of 3 months before the cardioversion.

Table 1

Baseline characteristics

Outcome

The outcome was successful electrical cardioversion, defined as sinus rhythm immediately after the cardioversion and no documented recurrence of AF within 3 months. Following cardioversion, all patients were examined with telemetry for at least 2 hours. Afterwards, the patients could report recurrence of symptoms to the hospital that led to examination for AF. Over the 3-month follow-up, AF could be detected using ECG or Holter monitoring by clinical indication. At 3 months, all patients went to a control examination, which included examination with ECG.

Statistical methods

We performed all analyses in women and men separately.

We considered the following continuous predictors: age, body mass index, heart rate, thyroid-stimulating hormone (TSH) level, haemoglobin, estimated glomerular filtration rate (eGFR), and left atrial diameter. We also considered the following categorical predictors: alcohol use, history of prior cardioversion and/or RFA, hypertension, diabetes, COPD, low left ventricular ejection fraction (<40%), use of antiarrhythmic drugs, use of beta-blockers, use of non-dihydropyridine calcium channel blockers, use of digoxin, use of ACE inhibitor (ACEI), or angiotensin II receptor blocker (ARB).

First, we used a random forest algorithm.13 A random forest is composed of multiple individual decision trees that operate as an ensemble (online supplementary material). To derive the random forest, we split the data randomly into a 50% partition used for training and 50% used for validation. We tuned the number of iterations (ie, number of subtrees) and number of variables to examine randomly at each split. We used 500 iterations to obtain stable out-of-bag and validations errors. We then used the lowest validation error to determine the number of variables in each model. The random forest does not rely on selecting variables, but predictors have different relative importance in the prediction. Importance of a variable was assessed by minimal depth from the tree trunk. We displayed plots of importance score for each predictor.

Second, we applied logistic regression with backward elimination to estimate ORs with 95% CIs. To account for a relevant increase in a continuous covariate, we reported OR per population SD difference. We selected variables based on the Akaike information criterion, which is equivalent to selecting based on a p value<0.1570.14 We forced both age and atrial diameter into the models, as they are clinically important predictors.4

For both the random forest and logistic regression, we estimated the C statistic to assess model discrimination. We assessed calibration as the agreement between predicted and observed probabilities of successful cardioversion in deciles of predicted probabilities using the Hosmer-Lemeshow test.

We performed analyses on complete cases. Among women, 300 of 332 (90.4%) patients were complete cases, and among men, 717 of 790 (90.8%) patients were complete cases. All analyses were performed in Stata V.15.1.

Patient and public involvement

This study was performed without patient involvement. Patients were not invited to comment on the study design and were not consulted to develop patient relevant outcomes or interpret the results. Patients were not invited to contribute to the writing or editing of the manuscript for readability or accuracy.

Results

Baseline characteristics and cardioversion success

During the study period, 332 women and 790 men with persistent AF underwent electrical cardioversion. The median age was 71 years among the women and 67 years among the men. Fewer women (29.8%) than men (36.9%) had a history of prior cardioversion and/or RFA (p=0.02). Baseline characteristics are summarised in table 1.

Immediate restoration of sinus rhythm failed in 41 (12.4%) women and in 56 (7.1%) men (p=0.004). Electrical cardioversion was successful in 149 women (44.9%) and 394 men (49.9%) (p=0.13). Among the 233 female and 498 male patients without prior cardioversion or RFA, electrical cardioversion was successful in 106 women (45.5%) and 245 men (49.2%; p=0.35). No patients died or were lost to follow up.

Prediction of successful cardioversion using machine learning

In the final models, the out-of-back and prediction errors were 53.6% and 41.0% for the women and 50.4% and 44.8% for the men, respectively. Figure 1 shows the relative importance of each variable for the prediction of successful cardioversion in men and in women. Among women, the five most important predictors were age, haemoglobin, eGFR, hypertension, and antiarrhythmic class III drugs. C statistic of the random forest model for women was 0.59 (95% CI 0.51 to 0.68) and the model was well calibrated (Hosmer-Lemeshow p=0.94; figure 2A). The five most important predictors among men were haemoglobin, TSH, eGFR, age, and left atrial diameter. C statistic of the random forest model for men was 0.56 (95% CI 0.51 to 0.62) and the model was well calibrated (Hosmer-Lemeshow p=0.36; figure 2A).

Figure 1

Importance score of predictor variables by sex. ACEI, ACE inhibitor; ARB, angiotensin II receptor blocker; BMI, body mass index; COPD, chronic obstructive pulmonary disease; eGFR, estimated glomerular filtration rate; Hgb, haemoglobin; LVEF, left ventricular ejection fraction; RFA, radiofrequency ablation; TSH, thyroid-stimulating hormone.

Figure 2

Calibration plots. Agreement between predicted and observed probabilities of successful cardioversion in deciles of predicted odds.

Prediction of successful cardioversion using logistic regression

Among women, TSH, diabetes mellitus, and use of beta-blockers were retained as predictors in the multivariable model. We forced age and atrial diameter into the model. Table 2 shows the ORs for the selected model. The model had moderate discrimination with a C statistic of 0.60 (95% CI 0.54 to 0.67) and was well calibrated (Hosmer-Lemeshow p=0.42; figure 2B). Among men, backward elimination led to retainment of ventricular ejection fraction below 40% and use of ACEI or ARB as predictors. Additionally, we forced age and atrial diameter into the model. The final multivariable prediction model is given in table 2. Like the model among women, the discrimination was moderate, with a C statistic of 0.59 (95% CI 0.55 to 0.63) and the model was well-calibrated well (Hosmer-Lemeshow p=0.41; figure 2B).

Table 2

Multivariable logistic regression models for successful cardioversion after electrical cardioversion

Comparison of machine learning and logistic regression predictions

The five most important variables according to the random forest model were different from the variables selected by the logistic regression model (figure 1 and table 2). Figure 3 shows the distribution of the predicted probabilities of successful electrical cardioversion for the random forest algorithm and logistic regression in men and women. Among the women, the prediction error of the multivariable logistic prediction model was 48.2% compared with 41.0% in the random forest algorithm, which corresponded to a difference of 7.2 percentage points in error rate. Among the men, the prediction error of the multivariable logistic prediction model was 46.6% compared with 44.8% in the random forest algorithm. This corresponded to a difference of 1.8 percentage points in error rate.

Figure 3

Comparison between machine learning and logistic regression of predicted probabilities of successful electrical cardioversion, by sex.

Discussion

In this large real-world cohort study of consecutive patients with persistent AF, we demonstrated that electrical cardioversion was successful for 45% of the female patients and 50% of the male patients during 3 months of follow-up. A higher recurrence rate among women is in accordance with a recent study that demonstrated a higher burden of atrial fibrosis among women with AF, which is associated with structural remodelling and more advanced disease.15 The fact that most patients in our study were men may indicate a more conservative clinical approach in the management of women with AF. This tendency is consistent with other studies, in which women were scheduled for cardioversion less frequently than men.4 16

We applied two approaches for the development of sex-specific prediction models for successful electrical cardioversion based on several candidate predictors available in routine clinical practice. The random forests and logistic regressions showed only moderate discriminative performance with C statistics of 0.59 and 0.60 among women, and 0.56 and 0.59 among men, respectively. Based on the clinical factors we included, the ability to predict which patients will benefit from electrical cardioversion is limited for both approaches. Furthermore, our results suggest that there are no substantial differences in the sex-specific predictive performance between the random forest and logistic regression.

Several studies have examined existing prediction models for successful/unsuccessful cardioversion or developed new prediction models.17–21 However, we are not aware of any prediction models developed separately in women and men. Accordingly, we cannot compare our findings with the literature directly. Previous studies have supported that atrial diameter is an important predictor.2 4 Contrarily, our random forest analyses did not rank atrial diameter as one of the most important predictors (14th most important predictor among women and 5th most important among men). As we used left atrial diameter as a proxy for atrial size and the left atrium is not uniformly spherical, the atrial diameter may not fully reflect the volume of the left atrium. Volume measurements of the left atrium might be a stronger predictor of ineffective cardioversion than atrial diameter; however, to our knowledge, the predictive ability for successful cardioversion has not been compared between those two measures so far.

Machine learning methods have gained currency in the last years, and a staggered variety of approaches with different properties have been developed. In comparison with typical regression techniques, probably the most prominent property of the decision tree/random forest approach in the present study is the capability of handling high-order interactions between the investigated predictors (as illustrated in the example in the online supplementary material).22 Further details about statistical differences have been described elsewhere.22 Nevertheless, the presented data held little evidence that the random forest approach provided any meaningful improvement of the prediction of successful cardioversion. This finding agrees well with a recent systematic review, which examined the performance of machine learning compared with logistic regression for the development of prediction models and found no evidence of a superiority of machine learning.23

Implications

Our results suggest that sex-specific identification of patients who will undergo successful cardioversion is challenging in routine clinical practice. Our sex-specific models found different clinically important predictors between sexes and approaches, but the models did not demonstrate improved predictive ability compared with other existing models. As our models only demonstrated moderate discrimination, further validation in external cohorts is needed.

Additionally, new approaches for developing prediction models should be considered. In a recent paper by Oto et al, the authors used a data mining algorithm to identify predictors of recurrence of persistent AF.24 To our knowledge, no studies have so far applied data mining algorithms to develop sex-specific prediction models for successful electrical cardioversion. Another future approach may be the use of personalised computational modelling of arrhythmogenesis, which was recently applied among patients with persistent AF to identify ablation targets.25 Theoretically, use of personalised computational models of the atria may be used to identify atrial substrate associated with a potential sustained effect of electrical cardioversion.

In contemporary medical practice, the shared decision of an electrical cardioversion needs to include a discussion on the high risk of recurrence of AF and willingness for exposure to antiarrhythmic drugs and ablation. Randomised trials have shown that rhythm control is not superior to rate control in the management of AF.26 27 Interestingly, these trials showed that mortality rates were significantly higher in women randomised to rhythm control as compared with men. Additionally, in relation to outcomes other than mortality, women assigned to rhythm control encountered worse outcomes compared with women in the rate control group.6 28 29 Therefore, since rhythm control is less beneficial in women and associated with more adverse events, patient sex may be important when deciding the optimal treatment strategy in AF.

Limitations

Our study had important limitations. Selection of patients for electrical cardioversion was based on shared decisions, which may reduce the generalisability of our results. For instance, our cohort included no multimorbid elderly patients and it is possible that patients with very enlarged atria and/or manifest heart failure were not scheduled for cardioversion. However, this way of recruiting patients reflects a real-world clinical setting. Information on other potential important predictors such as duration of AF or electrophysiological data was not available. We were not able to follow the patients with Holter monitoring or a loop/event recorder during the 3 months of follow-up and we had no information on the course of the patients’ symptoms.

Conclusions

In patients with persistent AF, sex-specific prediction of successful cardioversion is challenging. Machine learning and logistic regression models demonstrated modest predictive performance for successful electrical cardioversion. The high recurrence rate calls for thoroughly informed shared decision-making for electrical cardioversion, which should include a discussion about antiarrhythmic drug therapy and ablation in case of a failed cardioversion.

References

Footnotes

  • Contributors NV, ASF, LF, AEA and DSM participated in the original planning, conduct and design of the study; collected the data. NV, MF-G and LT performed the statistical analyses. NV, LT, MF-G and LF drafted the manuscript and ASF, AEA, GYHL and DSM provided manuscript editing and comments and suggestions.

  • Funding An unrestricted grant from Bristol-Myers Squibb (BMS) and Pfizer supported this study.

  • Disclaimer The sponsor had no role in the study design, in the collection and interpretation of the data, in the writing of this report, or in the decision to submit the article for publication.

  • Competing interests AEA: has been on the speaker bureaus for Astra Zenica, Bayer, BMS, Boehringer Ingelheim and Pfizer. GYHL: consultant for Bayer/Janssen, BMS/Pfizer, Medtronic, Boehringer Ingelheim, Novartis, Verseon and Daiichi-Sankyo. Speaker for Bayer, BMS/Pfizer, Medtronic, Boehringer Ingelheim and Daiichi-Sankyo. No fees are directly received personally. LT: is supported by a grant from AHA (18SFRN34150007). LF: has been an advisory board member for BMS, MSD and Pfizer in relation to non-interventional studies and has been on the speaker bureaus for Bayer, BMS, Boehringer Ingelheim, MSD and Pfizer. DSM: has been on the speaker bureaus for Bayer, BMS, Boehringer Ingelheim, MSD and Pfizer.

  • Patient consent for publication Not required.

  • Ethics approval The Danish Data Protection Agency (1-16-02-427-15) and the Medicines Authority (3-3013-1165/1) approved this study. Approval from an Ethics Committee was not required according to Danish law.

  • Provenance and peer review Not commissioned; externally peer reviewed.

  • Data availability statement No data are available. Data cannot be made available as access to patient records and public sharing of data are not legal, cf. Danish law.