Predicting the Risk of Severity and Readmission in Patients with Heart Failure in Indonesia: A Machine Learning Approach

Article information

Healthc Inform Res. 2024;30(3):253-265
Publication date (electronic) : 2024 July 31
doi : https://doi.org/10.4258/hir.2024.30.3.253
1Faculty of Public Health, Universitas Indonesia, Depok City, West Java, Indonesia
2Cardiology and Vascular Medicine Department, Faculty of Medicine, Universitas Indonesia, Jakarta, Indonesia
3Information Systems Department, School of Information Systems, Bina Nusantara University Indonesia, Jakarta, Indonesia
Corresponding Author: Finna E. Indriany, Faculty of Public Health, Universitas Indonesia, Pondok Cina, Kecamatan Beji, Depok City, West Java, Indonesia 12345. Tel: +628129336665, E-mail: finnadr@yahoo.com (https://orcid.org/0000-0002-6855-7003)
Received 2024 January 15; Revised 2024 June 15; Accepted 2024 July 21.

Abstract

Objectives

In Indonesia, the poor prognosis and high hospital readmission rates of patients with heart failure (HF) have yet to receive focused attention. However, machine learning (ML) approaches can help to mitigate these problems. We aimed to determine which ML models best predicted HF severity and hospital readmissions and could be used in a patient self-monitoring mobile application.

Methods

In a retrospective cohort study, we collected the data of patients admitted with HF to the Siloam Diagram Heart Center in 2020, 2021, and 2022. Data was analyzed using the Orange data mining classification method. ML support algorithms, including artificial neural network (ANN), random forest, gradient boosting, Naïve Bayes, tree-based models, and logistic regression were used to predict HF severity and hospital readmissions. The performance of these models was evaluated using the area under the curve (AUC), accuracy, and F1-scores.

Results

Of the 543 patients with HF, 3 (0.56%) were excluded due to death on admission. Hospital readmission occurred in 138 patients (25.6%). Of the six algorithms tested, ANN showed the best performance in predicting both HF severity (AUC = 1.000, accuracy = 0.998, F1-score = 0.998) and readmission for HF (AUC = 0.998, accuracy = 0.975, F1-score = 0.972). Other studies have shown variable results for the best algorithm to predict hospital readmission in patients with HF.

Conclusions

The ANN algorithm performed best in predicting HF severity and hospital readmissions and will be integrated into a mobile application for patient self-monitoring to prevent readmissions.

I. Introduction

The signs and symptoms of heart failure (HF), a complex and potentially fatal clinical syndrome, are caused by the heart’s diminished ability to pump and supply blood to the rest of the body. HF results in high medical costs, poor functional capacity and quality of life, and significant morbidity and mortality [13]. HF is an international concern and is thought to affect approximately 64 million individuals. It was estimated that there were 17 cases of HF for every 1,000 people in 13 European nations. In the United States, the prevalence of HF was 2.4% in 2012 and is expected to rise to 3.0% by 2030. There are limited data on the prevalence of HF in Asia, with estimates ranging from 1.3% to 6.7% [35].

Patients with HF have a poor prognosis; 5% to 10% die while hospitalized, 15% within 3 months of hospitalization, and >50% within 5 years of their initial hospitalization for HF [6]. Hospitalization rates were 43% at least four times and 83% at least once. Readmission occurs in approximately 30% of patients within 30 to 60 days following their initial discharge [7]. The absolute death rate from HF within 5 years of diagnosis remains approximately 50%, despite increasing cure rates. In 2012, the global expense of treating HF surpassed $100 billion [8]. Another study showed that the individual annual cost of HF management in the United States ranged from $10,832 to $17,744, with nationwide expenses of $20.9 billion in 2012 and a projected $53.1 billion by 2030. Hospital readmissions add a significant financial burden to both the healthcare system and to patients. This is a problem that requires increased attention [9].

The Global Burden of Disease Study demonstrated how the disease burden, as measured in disability-adjusted life years (DALYs), changed in Indonesia between 1990 and 2016. The disease burden was primarily due to diarrheal diseases in 1990, which led to communicable, maternal, neonatal, and nutritional disorders. In 2006, ischemic heart disease was the predominant cause, with cerebrovascular diseases in third place; by 2016 these were the first and second causes. Although Indonesia saw an 8-year increase in life expectancy at birth between 1990 and 2016, this was accompanied by a rise in the prevalence of cardiac and cerebrovascular diseases, which can lead to HF [10].

Numerous variations of machine learning (ML) techniques have been widely used in healthcare for the treatment of ailments like HF and cardiovascular diseases. ML techniques have demonstrated effectiveness in prediction and classification tasks [11]. By identifying important risk variables, predictive models help identify patients who are at high risk of readmission to the hospital and may even make it possible to target specific interventions for the people who could benefit from them the most. When compared to traditional statistical techniques, ML methods can improve the range of prediction since they can exploit all available data and their complex relationships [12]. Analyzing various ML algorithms can lead to a deeper comprehension of the models and their real-time applications [13]. In addition, as digital technology and artificial intelligence have progressed, their capacity to offer clinical judgment has resulted in remarkable new features [14].

The objective of this study was to determine the ML method that performs best and to create recommendations for readmission prevention. Our subsequent goal will be to develop a mobile application that helps prevent hospital readmissions for patients with HF. Mobile applications can also improve HF management by encouraging patients to adopt preventive strategies [15].

II. Methods

1. Data Collection and Preparation

We used the 2019 version of the International Classification of Diseases, 10th Revision (ICD-10) codes (specifically I50 for HF) [16] in a retrospective cohort analysis to examine data from 543 patients who had HF. These patients were admitted to the Siloam Diagram Heart Center in Indonesia from January 2020 to December 2022. The patient data was followed for readmissions over a period of 1 year after each admission. Three patients died while they were being admitted to the hospital. Data was taken from medical records and extracted using a checklist of 83 elements based on the patient’s identity and history, and the clinical examinations performed by a cardiologist and hospital staff. The checklist included data on demographic variables, past medical history, current admission medical history, comorbidities, procedures or implant placement, signs and symptoms, physical examination, and laboratory results. Little to no data was available for 13 of the elements, which were eliminated from the checklist. Since patient medical records were not entirely computerized at this hospital, data were either automatically gathered from electronic medical records or manually gathered from physical medical records. During the follow-up period, HF severity and the intervals of unplanned hospital readmissions for HF were calculated. The Research and Community Service Ethics Committee granted ethical approval for this study (No. Ket-592/UN2.F10. D11/PPM.00.02/2023).

2. Predictive Variables

Since the Indonesian health system is not focused on HF specifically, we did not have basic clinical data regarding significant variables that can predict the severity and readmission rates of patients with HF in Indonesia. Therefore, we conducted a systematic literature review prior to the study to obtain the necessary variables. We used ML due to the relatively large number of variables. We included elements that were commonly applied in other studies and classified them by the rule-based method into 8 categories. The categories included: (1) demographics and socioeconomic profile (age, gender, marital status, payer status, home address, living partner, education, occupation), (2) medical history (family history of HF, time since HF diagnosed, intensive care unit/high care unit (ICU/HCU) stays during the current admission, total hospital length of stay (LOS), number of admissions for HF in the past year, number of emergency department (ED) visits because of HF in the past year, and adherence to once-a-month outpatient visits after discharge), (3) habits (smoking, alcohol, dietary salt intake, and drug use), (4) medication therapy (angiotensin-converting enzyme inhibitors/angiotensin II receptor blockers/angiotensin receptor II blocker-neprilysin inhibitors, diuretics, beta blockers, spironolactone), (5) signs and symptoms, physical assessment (shortness of breath, edema, systolic blood pressure, diastolic blood pressure, heart rate, respiratory rate, O2 saturation, jugular venous pressure, left ventricular ejection fraction [LVEF], New York Heart Association [NYHA] classification, and body mass index [BMI]), (6) lab results (hemoglobin, hematocrit, white blood cell count, glucose, sodium, potassium, balance urea nitrogen, urea, creatinine, and glomerular filtration rate [GFR]), (7) comorbidities (anemia, aortic valve disorder, asthma, cancer, cardiac arrhythmia, cerebrovascular accident/stroke, coronary artery disease [CAD], chronic obstructive pulmonary disease, dementia, depression, diabetes mellitus, dyslipidemia, hypertension, liver disease, lung disease, protein-calorie malnutrition, psychiatric disorder, renal disease, rheumatic disease, thyroid disease, and vascular disease), and (8) medical procedures or implant history (cancer-related procedures, cardiac devices, cardiac operations, coronary angioplasty, and mechanical ventilation devices).

3. Machine Learning Process

Data preparation, model selection, model training, and performance evaluation were the four main steps in the procedure (Figure 1). In data pre-processing, we used a rule-based technique and separated the targets into two categories, HF severity and readmissions for HF. The HF severity index was developed by combining several variables: LVEF, NYHA classification, creatinine levels, and history of CAD. The readmission index was developed using the number of hospital admissions and the average interval between admissions. We used version 3.36 of the Orange data mining process. A systematic literature review was conducted prior to this study to identify some of the best-performing ML algorithms. We tested six algorithms: logistic regression, trees, random forest, gradient boosting, naïve Bayes, and neural network.

Figure 1

Process to determine the best machine learning model for predicting heart failure (HF) severity and hospital readmission in patients with HF. LR: logistic regression, RF: random forest, GB: gradient boosting, NB: naïve Bayes, ANN: artificial neural network, AUC: area under the curve.

4. Machine Learning Algorithms

The classification approach incorporated multiple ML models. The best technique for analyzing binary classification tasks with strong diagnostic ability is logistic regression [17]. Despite being extensively utilized in medical diagnostics, logistic regression models have several drawbacks. First, because logistic regression models rely on linearity assumptions, they may perform poorly when applied to nonlinear data distributions. The dependability of logistic regression models can be strongly impacted by the existence of outliers in the data. These models are prone to overfitting when faced with limited sample sizes, and the use of point estimation in logistic regression models creates uncertainty in the dependability of regression coefficients. A classifier called a decision tree is created by continually dividing the training set using features to predict the class labels [18]. With the help of this supervised method, data can be divided into subgroups according to specific criteria and can be used for regression and classification. This mathematical model provides a graphical depiction of every potential answer, from which a choice must be made. The only element in the graphical depiction is a tree with conditions, where certain conditions may influence the decisions [19]. Known as an ensemble classifier, the random forest method repeats random sampling for predictors and observations to train several weak classifiers [20]. This method entails building several decision trees that are used to categorize and pinpoint crucial variables for forecasting. Gradient boosting produces integrated and weighted predictive variables, thereby leveraging the potential of weaker predictors [12]. Boosting algorithms iteratively combine weak learners (i.e., learners that are only marginally better than random chance) into strong learners. Regression algorithms that resemble boosting are called gradient boosting. Extreme gradient boosting (XGBoost) is a highly scalable decision tree ensemble that utilizes gradient boosting. Like gradient boosting, XGBoost minimizes a loss function to provide an additive extension of the objective function. A version of the loss function is employed to regulate the complexity of the tree, while XGBoost is limited to using decision trees as base classifiers [18]. It is an ensemble classifier that teaches weak classifiers one after the other to fix the mistakes of the last prediction until there is no further improvement. Naïve Bayes models are generative models that assume that the characteristics, or “events,” are produced independently. As one of the most basic models in ML, Naïve Bayes classifiers still perform admirably in practical applications [21]. An artificial neural network, or ANN, is modeled after a biological learning system, which is made up of interconnected nerve cells called neurons. This model has several benefits, including a significantly improved prediction of hospital readmission risk. Since it is based on real-time data from the electronic health record, it is applicable at the time of hospital discharge. It is also compact and not susceptible to model drift [22]. Each of these approaches performs differently, depending on the data; therefore, no one approach is truly the best [9]. We compared the ANN method with other studies that focused on the performance of deep uncertainty networks (DUNs) relative to techniques like logistic regression, gradient boosting, and maxout networks and evaluated the method using 10-fold cross-validation [23] or compared it to traditional statistical models [24].

5. Statistical Analysis and Performance Criteria

The performance of various ML algorithms was assessed using area under the curve (AUC), accuracy, and F1-score. Numerous attempts were made to build predictive models, and the average values for these evaluation criteria were computed. The algorithms we compared included logistic regression, decision tree, random forest, gradient boosting, Naïve Bayes, and neural networks. Accuracy was measured by determining the proportion of correctly predicted instances to the total instances. The F1-score was the harmonic mean of precision and recall. The AUC represented the area under the ROC curve, which indicated the model’s ability to distinguish between classes.

III. Results

1. Baseline Data and Variable Classification Results

The characteristics of the patients with HF are shown in Table 1 according to the eight categories of variables.

Classification of the baseline data of Indonesian patients with HF into 8 categories (n = 540)

2. Statistical Data Results

Of the 540 patients with HF, 138 (25.6%) had at least one hospital readmission. Table 2 shows the clinical characteristics of the patients with HF.

Clinical characteristics of Indonesian patients with HF (n = 540)

At baseline, the mean age of patients was 61.7 ± 11.8 years, the period since HF diagnosis averaged 2.1 ± 1.7 years, the LOS in the hospital was 3.3 ± 1.8 days, the number of admissions in the past year averaged 0.5±0.7, and the number of emergency department visits was 0.6 ± 1.0.

Vital signs and clinical measurements included a mean systolic blood pressure of 131.3 ± 24.8 mmHg, diastolic blood pressure of 79.4 ± 15.8 mmHg, heart rate of 86.0 ± 17.8 beats per minute, respiratory rate of 20.3 ± 2.8 breaths per minute, and oxygen saturation levels of 96.6% ± 2.7%. The mean LVEF was 38.8%±14.3%, and the mean BMI was 25.7 ± 4.8 kg/m2.

The mean laboratory values were as follows: hemoglobin, 12.7±2.0 g/dL; hematocrit, 38.4%±5.7%; white blood cell count, 8.6 ± 3.2 ×103/μL; glucose level, 147.7±59.1 mg/dL; sodium level 137.1±4.5 mmol/L; potassium level, 3.9±0.7 mmol/L; blood urea nitrogen, 23.4±14.3 mg/dL; urea, 50.0±30.6 mg/dL; creatinine, 1.5±1.1 mg/dL; and estimated glomerular filtration rate, 59.5±22.1 mL/min/1.73 m2.

3. Machine Learning Performance Evaluation

Model performance is shown in Tables 3 and 4.

Performance of HF severity index model

Performance of the hospital readmission for HF index model

In the index for predicting HF severity, the neural network performed best in three measures: AUC, accuracy, and F1-score. Neural networks provided the highest AUC (1,000). The accuracy of the neural network and F1-score were approximately 1,000. The naïve Bayes showed the lowest scores for AUC, accuracy and F1-score.

In the index for predicting readmission, the neural network performed best in all three measures (AUC, accuracy, and F1-score). Neural networks and random forests produced the highest AUC (0.988), followed by logistic regression and trees. Neural networks and F1-scores had the highest accuracy. The Naïve Bayes had the lowest scores in AUC, accuracy and F1-score.

Important features were extracted from the data by features importance, both of 70 variables and 8 variables that had been categorized.

The top three important variables for predicting HF severity were creatinine level, LVEF, and CAD. The top variables for predicting hospital readmission were the number of admissions for HF within 1 year, dyslipidemia, and hospital LOS (Figure 2).

Figure 2

Comparison of 70 variables as predictors of HF severity (A) and hospital readmission for HF (B). HF: heart failure, LVEF: left ventricular ejection fraction, NYHA: New York Heart Association, ED: emergency department, LOS: length of stay.

The top three predictors of HF severity in the eight categories were lab results, comorbidities, and medical history. The top three predictors of hospital readmission were physical assessment, comorbidities, and medical history (Figure 3).

Figure 3

Comparison of eight clinical categories as predictors of heart failure (HF) severity (A) and hospital readmission for HF (B).

In comparing AUC scores, our research tended to have higher AUCs than the models from Golas et al. [23] across similar algorithms. The logistic regression model achieved an AUC of 0.992 compared to 0.664 ± 0.015 in the study by Golas et al. [23] The gradient boosting model produced an AUC of 0.958 in our study versus 0.650 ± 0.011 in the study by Golas et al. [23] (Table 5).

Comparison of AUCs derived by two studies of various machine learning models

IV. Discussion

Many studies have been conducted worldwide to predict readmission in patients with HF, with various characteristics and results. This study was conducted to determine the best ML method to predict both the severity of HF and the risk of hospital readmission for patients with HF. To predict both HF severity and readmission risk, we found that the neural network algorithm performed best (AUC = 1.000 and 0.998), higher than the results found in our systematic literature review (AUC = 0.930). Although other algorithms had AUCs <0.900, they performed well; tree, random forest, and gradient boosting for HF severity prediction and tree, random forest and logistic regression for readmission prediction.

Golas et al. [23] conducted a study to compare various ML methods for predicting readmission rates for patients with HF, focusing on the performance of DUNs relative to other techniques such as logistic regression, gradient boosting, and maxout networks. The study evaluated these methods using 10-fold cross-validation, with DUNs achieving the highest mean AUC (0.705), outperforming maxout networks (0.695), logistic regression (0.664), and gradient boosting (0.650) [23]. The study by Frizzell et al. [24] compared the efficacy of ML algorithms to traditional statistical models in predicting 30-day readmissions for HF. Using data from the get with the guidelines (GWTG)-HF dataset, the researchers analyzed 56,477 patients and found that ML models, such as the tree-augmented Naive Bayes, random forest, and gradient-boosted models, did not significantly outperform logistic regression and least absolute shrinkage and selection operator (LASSO) models [24]. Differences in the outcomes of these studies, as well as the present study, suggest that the most effective ML method can vary across different populations. Therefore, further analysis is needed to enhance the predictability of these models in a way that can be generalized to a broader population.

While analyzing the predictive importance of the eight feature categories, the three most important categories for predicting HF severity were laboratory results, comorbidities, and medical history. The most important categories for predicting readmission were physical assessment, comorbidities, and medical history. We also evaluated all the original 70 variables before they were categorized. We found the three most important variables for predicting severity were creatinine level, LVEF score, and a diagnosis of CAD, and the most important variables for predicting readmission were the number admissions for HF in the past year, dyslipidemia, and hospital LOS. As a comparison, Frizzell et al. [24] found that low LVEF, ischemic heart disease, and hospital LOS were significant variables in their logistic regression model, while admission history was not significant. These results will be used for further research or to provide implements that aid in the management of HF.

This research had several limitations. First, the data were obtained from the Diagram Heart Center, which is still developing its inpatient electronic medical records, and manual efforts to collect data could impact results. The performance of the ML methods could also be impacted by missing data. Second, clinically specific variables were not fully supported where they were necessary for making predictions (e.g., specific physical examination results, lab results, or variations in medication cost coverage). However, our research showed that ML techniques are effective at predicting the severity of HF and hospital readmission. The identification of patients who are at high risk of severe HF and hospital readmission for HF can be helped by these results. Raising physician awareness of the benefits of early HF management can lower costs and enhance quality of life.

In conclusion, this study showed that ANN outperformed other ML models in predicting HF severity and hospital readmissions in patients with HF. Thus, this model will be integrated into a self-monitoring mobile application for patients with HF. In addition, these findings may help researchers design larger-scale studies that utilize the highest level ML methods to benefit individuals with HF.

Acknowledgments

This paper is part of a PhD thesis of the first author in Public Health and supported by Universitas Indonesia with grant number NKB-213/UN2.RST/HKP.05.00/2023.

Notes

Conflict of Interest

No potential conflict of interest relevant to this article was reported.

References

1. Heidenreich PA, Bozkurt B, Aguilar D, Allen LA, Byun JJ, Colvin MM, et al. 2022 AHA/ACC/HFSA guideline for the management of heart failure: a report of the American College of Cardiology/American Heart Association Joint Committee on Clinical Practice Guidelines. J Am Coll Cardiol 2022;79(17):e263–421. https://doi.org/10.1016/j.jacc.2021.12.012.
2. McDonagh TA, Metra M, Adamo M, Gardner RS, Baumbach A, Bohm M, et al. 2021 ESC Guidelines for the diagnosis and treatment of acute and chronic heart failure. Eur Heart J 2021;42(36):3599–726. https://doi.org/10.1093/eurheartj/ehab853.
3. Savarese G, Becher PM, Lund LH, Seferovic P, Rosano GM, Coats AJ. Global burden of heart failure: a comprehensive and updated review of epidemiology. Cardiovasc Res 2023;118(17):3272–87. https://doi.org/10.1093/cvr/cvac013.
4. Joseph P, Dokainish H, McCready T, Budaj A, Roy A, Ertl G, et al. A multinational registry to study the characteristics and outcomes of heart failure patients: the global congestive heart failure (G-CHF) registry. Am Heart J 2020;227:56–63. https://doi.org/10.1016/j.ahj.2020.06.002.
5. Hill L, Baruah R, Beattie JM, Bistola V, Castiello T, Celutkiene J, et al. Culture, ethnicity, and socio-economic status as determinants of the management of patients with advanced heart failure who need palliative care: a clinical consensus statement from the Heart Failure Association (HFA) of the ESC, the ESC Patient Forum, and the European Association of Palliative Care. Eur J Heart Fail 2023;25(9):1481–92. https://doi.org/10.1002/ejhf.2973.
6. Reyes EB, Ha JW, Firdaus I, Ghazi AM, Phrommintikul A, Sim D, et al. Heart failure across Asia: same healthcare burden but differences in organization of care. Int J Cardiol 2016;223:163–7. https://doi.org/10.1016/j.ijcard.2016.07.256.
7. Jackson JD, Cotton SE, Bruce Wirta S, Proenca CC, Zhang M, Lahoz R, et al. Burden of heart failure on caregivers in China: results from a cross-sectional survey. Drug Des Devel Ther 2018;12:1669–78. https://doi.org/10.2147/dddt.s148970.
8. MacDonald MR, Tay WT, Teng TK, Anand I, Ling LH, Yap J, et al. Regional variation of mortality in heart failure with reduced and preserved ejection fraction across Asia: outcomes in the ASIAN-HF registry. J Am Heart Assoc 2020;9(1):e012199. https://doi.org/10.1161/jaha.119.012199.
9. Tripoliti EE, Papadopoulos TG, Karanasiou GS, Naka KK, Fotiadis DI. Heart failure: diagnosis, severity estimation and prediction of adverse events through machine learning techniques. Comput Struct Biotechnol J 2016;15:26–47. https://doi.org/10.1016/j.csbj.2016.11.001.
10. Mboi N, Murty Surbakti I, Trihandini I, Elyazar I, Houston Smith K, Bahjuri Ali P, et al. On the road to universal health care in Indonesia, 1990–2016: a systematic analysis for the Global Burden of Disease Study 2016. Lancet 2018;392(10147):581–91. https://doi.org/10.1016/s0140-6736(18)30595-6.
11. Manuaba IB, Sutedja I, Bahana R. The evaluation of supervised classifier models to develop a machine learning API for predicting. ICIC Express Lett 2020;14(3):219–26. https://doi.org/10.24507/icicel.14.03.219.
12. Mortazavi BJ, Downing NS, Bucholz EM, Dharmarajan K, Manhapra A, Li SX, et al. Analysis of machine learning techniques for heart failure readmissions. Circ Cardiovasc Qual Outcomes 2016;9(6):629–40. https://doi.org/10.1161/circoutcomes.116.003039.
13. Symum H, Zayas-Castro JL. Prediction of chronic disease-related inpatient prolonged length of stay using machine learning algorithms. Healthc Inform Res 2020;26(1):20–33. https://doi.org/10.4258/hir.2020.26.1.20.
14. Thanathornwong B, Suebnukarn S, Ouivirach K. Clinical decision support system for geriatric dental treatment using a Bayesian network and a convolutional neural network. Healthc Inform Res 2023;29(1):23–30. https://doi.org/10.4258/hir.2023.29.1.23.
15. Safdari R, Jafarpour M, Mokhtaran M, Naderi N. Designing and implementation of a heart failure telemonitoring system. Acta Inform Med 2017;25(3):156–62. https://doi.org/10.5455/aim.2017.25.156-162.
16. Deschepper M, Eeckloo K, Vogelaers D, Waegeman W. A hospital wide predictive model for unplanned readmission using hierarchical ICD data. Comput Methods Programs Biomed 2019;173:177–83. https://doi.org/10.1016/j.cmpb.2019.02.007.
17. Stojanov D, Lazarova E, Veljkova E, Rubartelli P, Giacomini M. Predicting the outcome of heart failure against chronic-ischemic heart disease in elderly population: machine learning approach based on logistic regression, case to Villa Scassi hospital Genoa, Italy. J King Saud Univ - Sci 2023;35(3):102573. https://doi.org/10.1016/j.jksus.2023.102573.
18. Han S, Sohn TJ, Ng BP, Park C. Predicting unplanned readmission due to cardiovascular disease in hospitalized patients with cancer: a machine learning approach. Sci Rep 2023;13(1):13491. https://doi.org/10.1038/s41598-023-40552-4.
19. Sanni RR, Guruprasad HS. Analysis of performance metrics of heart failured patients using Python and machine learning algorithms. Glob Transit Proc 2021;2(2):233–7. https://doi.org/10.1016/j.gltp.2021.08.028.
20. Bentejac C, Csorgo A, Martinez-Munoz G. A comparative analysis of XGBoost [Online] Ithaca (NY): arXiv. org; 2019. [cited at 2024 Jul 31]. Available from: https://arxiv.org/abs/1911.01914.
21. Dai W, Brisimi TS, Adams WG, Mela T, Saligrama V, Paschalidis IC. Prediction of hospitalization due to heart diseases by supervised learning methods. Int J Med Inform 2015;84(3):189–97. https://doi.org/10.1016/j.ijmedinf.2014.10.002.
22. Pishgar M, Theis J, Del Rios M, Ardati A, Anahideh H, Darabi H. Prediction of unplanned 30-day readmission for ICU patients with heart failure. BMC Med Inform Decis Mak 2022;22(1):117. https://doi.org/10.1186/s12911-022-01857-y.
23. Golas SB, Shibahara T, Agboola S, Otaki H, Sato J, Nakae T, et al. A machine learning model to predict the risk of 30-day readmissions in patients with heart failure: a retrospective analysis of electronic medical records data. BMC Med Inform Decis Mak 2018;18(1):44. https://doi.org/10.1186/s12911-018-0620-z.
24. Frizzell JD, Liang L, Schulte PJ, Yancy CW, Heidenreich PA, Hernandez AF, et al. Prediction of 30-day all-cause readmissions in patients hospitalized for heart failure: comparison of machine learning and other statistical approaches. JAMA Cardiol 2017;2(2):204–9. https://doi.org/10.1001/jamacardio.2016.3956.

Article information Continued

Figure 1

Process to determine the best machine learning model for predicting heart failure (HF) severity and hospital readmission in patients with HF. LR: logistic regression, RF: random forest, GB: gradient boosting, NB: naïve Bayes, ANN: artificial neural network, AUC: area under the curve.

Figure 2

Comparison of 70 variables as predictors of HF severity (A) and hospital readmission for HF (B). HF: heart failure, LVEF: left ventricular ejection fraction, NYHA: New York Heart Association, ED: emergency department, LOS: length of stay.

Figure 3

Comparison of eight clinical categories as predictors of heart failure (HF) severity (A) and hospital readmission for HF (B).

Table 1

Classification of the baseline data of Indonesian patients with HF into 8 categories (n = 540)

Characteristic n (%)
1. Profile

 Age (yr)
  <19 0 (0)
  19–44 41 (7.6)
  45–59 186 (34.4)
  ≥60 313 (58.0)

 Sex
  Male 351 (65.0)
  Female 189 (35.0)

 Marital status
  Single 15 (2.8)
  Married 518 (95.9)
  Widowed 7 (1.3)

 Payer
  Personal 39 (7.2)
  Non-BPJS health insurance 23 (4.3)
  BPJS health 472 (87.4)
  Company/corporation 6 (1.1)

 Home address
  Jabodetabek 500 (92.6)
  Java outside Jabodetabek 23 (4.3)
  Outside Java 17 (3.1)

 Living partner
  Alone 3 (0.6)
  With others 537 (99.4)

 Education
  No formal education 6 (1.1)
  Elementary school 3 (0.6)
  Junior high school 16 (3.0)
  High school 352 (65.2)
  Bachelor’s degree 157 (29.1)
  Master’s degree 6 (1.1)

 Occupation
  Unemployed 216 (40.0)
  Public/private employee 289 (53.5)
  Entrepreneur 35 (6.5)

2. Medical history

 Family history of HF
  Yes 213 (39.4)
  No 327 (60.6)

 HF diagnosis (yr)
  <1 222 (41.1)
  2–3 65 (12.0)
  1–2 138 (25.6)
  First time 33 (6.1)
  3–5 63 (11.7)
  ≥10 4 (0.7)
  5–10 15 (2.8)

 ICU/HCU admission
  Yes 384 (71.1)
  No 156 (28.9)

 Hospital length of stay (day)
  <4 405 (75.0)
  4–7 111 (20.6)
  7–10 20 (3.7)
  ≥10 4 (0.7)

 Number of HF admissions in past 1 year (existing admission not included)
  Never 352 (65.2)
  1 118 (21.9)
  2 53 (9.8)
  3 8 (1.5)
  >3 9 (1.7)

 Number of ED visits because of HF in the past 1 year (existing ED visit not included)
  Never 351 (65.0)
  1 134 (24.8)
  2 45 (8.3)
  3 7 (1.3)
  >3 3 (0.6)

 Outpatient adherence
  No 199 (36.9)
  Yes 341 (63.1)

3. Habits

 Smoking
  No 211 (39.1)
  Yes 329 (60.9)

 Alcohol
  No 496 (91.9)
  Yes 44 (8.1)

 Salt diet
  No 536 (99.3)
  Yes 4 (0.7)

 Substance abuse
  No 540 (100)
  Yes 0 (0)

4. Medication therapy

 ACE inhibitor/ARB/ARNI
  No 100 (18.5)
  Yes 440 (81.5)

 Diuretics
  No 123 (22.8)
  Yes 417 (77.2)

 Beta blocker
  No 152 (28.1)
  Yes 388 (71.9)

 Spironolactone
  No 260 (48.1)
  Yes 280 (51.9)

5. Sign, symptoms, physical assessment

 Short of breath
  No 39 (7.2)
  Yes 501 (92.8)

 Edema
  No 303 (56.1)
  Yes 237 (43.9)

 Systolic blood pressure (mmHg)
  130–139 101 (18.7)
  140–179 149 (27.6)
  90–119 168 (31.1)
  120–129 90 (16.7)
  ≥180 25 (4.6)
  <90 7 (1.3)

 Diastolic blood pressure (mmHg)
  60–79 251 (46.5)
  80–89 125 (23.1)
  90–109 110 (20.4)
  <60 34 (6.3)
  ≥110 20 (3.7)

 Heart rate (beats/min)
  60–100, normal 419 (77.6)
  ≥100, above normal 102 (18.9)
  ≤60, below normal 19 (3.5)

 Respiratory rate (breaths/min)
  <12 0 (0)
  12–20 363 (67.2)
  21–28 166 (30.7)
  >28 11 (2.0)

 Oxygen saturation (%)
  98–100 245 (45.4)
  94–98 243 (45.0)
  90–94 40 (7.4)
  <90 12 (2.2)

 Jugular venous pressure
  Not increased 508 (94.1)
  Increased 32 (5.9)

 LVEF
  HFrEF, LVEF <40% 341 (63.1)
  HFpEF, LVEF >50% 112 (20.7)
  HFmrEF, LVEF 40%–50% 87 (16.1)

 NYHA classification
  I 31 (5.7)
  II 334 (61.9)
  III 150 (27.8)
  IV 25 (4.6)

 Body mass index (kg/m2)
  25.0–29.9, overweight 235 (43.5)
  18.5–24.9, healthy weight 211 (39.1)
  <18.5, underweight 18 (3.3)
  ≥30, obese 76 (14.1)

6. Lab results

 Hemoglobin (mg/dL)
  <13.40 (M), <10.85 (F), below normal 240 (44.4)
  13.40–17.30 (M), 10.85–14.90 (F), normal 294 (54.4)
  >17.30 (M), >14.90 (F), above normal 6 (1.1)

 Hematocrit (%)
  <39.90 (M), <34.00 (F), below normal 239 (44.3)
  39.90–51.10 (M), 34.00–45.10 (F), normal 290 (53.7)
  >51.10 (M), >45.10 (F), above normal 11 (2.0)

 White blood cell (×103/μL)
  4–11, normal 440 (81.5)
  >11, above normal 84 (15.6)
  <4, below normal 16 (3.0)

 Glucose (mg/dL)
  <200, normal 463 (85.7)
  ≥200, above normal 77 (14.3)

 Sodium (mmol/L)
  136–145, normal 402 (74.4)
  <136, below normal 135 (25.0)
  >145, above normal 3 (0.6)

 Potassium (mmol/L)
  3.5–5.1, normal 388 (71.9)
  <3.5, below normal 119 (22.0)
  >5.1, above normal 33 (6.1)

 Blood urea nitrogen (mg/dL)
  <7, below normal 2 (0.4)
  7–20, normal 355 (65.7)
  >20, above normal 183 (33.9)

 Urea (mg/dL)
  <16.6, below normal 0 (0)
  16.6–48.5, normal 391 (72.4)
  >48.5, above normal 143 (26.5)

 Creatinine (mg/dL)
  <16.6, below normal 6 (1.1)
  <1.2, normal 281 (52.0)
  ≥1.2, above normal 259 (48.0)

 eGFR (mL/min/17.3 m2)
  <60, below normal 359 (66.5)
  60–120, normal 177 (32.8)
  >120, above normal 4 (0.7)

7. Comorbidities

 Anemia
  No 490 (90.7)
  Yes 50 (9.3)

 Aortic valve disorder
  No 359 (66.5)
  Yes 181 (33.5)

 Asthma
  No 519 (96.1)
  Yes 21 (3.9)

 Cancer
  No 537 (99.4)
  Yes 3 (0.6)

 Cardiac arrhythmia
  No 386 (71.5)
  Yes 154 (28.5)

 Cerebrovascular accident
  No 509 (94.3)
  Yes 31 (5.7)

 Coronary artery disease
  No 133 (24.6)
  Yes 407 (75.4)

 COPD
  No 534 (98.9)
  Yes 6 (1.1)

 Dementia
  No 539 (99.8)
  Yes 1 (0.2)

 Depression
  No 537 (99.4)
  Yes 3 (0.6)

 Diabetes mellitus
  No 281 (52.0)
  Yes 259 (48.0)

 Dyslipidemia
  No 240 (44.4)
  Yes 300 (55.6)

 Hypertension
  No 107 (19.8)
  Yes 433 (80.2)

 Liver disease
  No 535 (99.1)
  Yes 5 (0.9)

 Lung disease
  No 502 (93.0)
  Yes 38 (7.0)

 Protein-calorie malnutrition
  No 537 (99.4)
  Yes 3 (0.6)

 Psychiatric disorder
  No 536 (99.3)
  Yes 4 (0.7)

 Renal disease/CKD
  No 365 (67.6)
  Yes 175 (32.4)

 Rheumatic disease
  No 535 (99.1)
  Yes 5 (0.9)

 Thyroid disease
  No 536 (99.3)
  Yes 4 (0.7)

 Vascular disease
  No 520 (96.3)
  Yes 20 (3.7)

8. History of medical procedure or implant

 Cancer related procedure
  No 538 (99.6)
  Yes 2 (0.4)

 Cardiac devices
  No 451 (83.5)
  Yes 89 (16.5)

 Cardiac surgery
  No 517 (95.7)
  Yes 23 (4.3)

 Coronary angioplasty
  No 311 (57.6)
  Yes

 Mechanical ventilation
  No 511 (94.6)
  Yes 29 (5.4)

HF: heart failure, ED: emergency department, ICU: intensive care unit, ACE: angiotensin-converting enzyme, ARB: angiotensin II receptor blockers, ARNI: angiotensin receptor II blocker - neprilysin inhibitor, NYHA: New York Heart Association, LVEF: left ventricular ejection fraction, eGFR: estimated glomerular filtration rate, COPD: chronic obstructive pulmonary disease, CKD: chronic kidney disease, M: male, F: female.

Table 2

Clinical characteristics of Indonesian patients with HF (n = 540)

Min Max Mean SD
Age (yr) 23.0 91.0 61.7 11.8
HF diagnosed period (yr) 0.0 10.0 2.1 1.7
Length of stay (day) 0.2 11.5 3.3 1.8
Number of admissions in the past 1 year 0.0 4.0 0.5 0.7
Number of ED visits in the past 1 year 0.0 9.0 0.6 1.0
Systolic blood pressure (mmHg) 74.0 220.0 131.3 24.8
Diastolic blood pressure (mmHg) 41.0 166.0 79.4 15.8
Heart rate (beats/min) 55.0 163.0 86.0 17.8
Respiratory rate (breaths/min) 15.0 35.0 20.3 2.8
Oxygen saturation (%) 79.0 100.0 96.6 2.7
LVEF 10.0 79.0 38.8 14.3
Body mass index (kg/m2) 15.2 59.1 25.7 4.8
Hemoglobin (mg/dL) 2.6 17.9 12.7 2.0
Hematocrit (%) 15.6 52.5 38.4 5.7
White blood cell (×103/μL) 3.1 36.6 8.6 3.2
Glucose (mg/dL) 33.0 664.0 147.7 59.1
Sodium/Natrium (mmol/L) 104.0 149.0 137.1 4.5
Potassium/Kalium (mmol/L) 1.4 7.2 3.9 0.7
Balance urea nitrogen (mg/dL) 6.1 119.2 23.4 14.3
Urea (mg/dL) 13.0 255.0 50.0 30.6
Creatinine (mg/dL) 0.4 11.1 1.5 1.1
eGFR (mL/min/17.3 m2) 6.6 139.6 59.5 22.1

HF: heart failure, ED: emergency department, LVEF: left ventricular ejection fraction, NYHA: New York Heart Association, eGFR: estimated glomerular filtration rate, SD: standard deviation.

Table 3

Performance of HF severity index model

Logistic regression Tree Random forest Gradient boosting Naïve Bayes Neural networks
AUC 0.970 0.998 0.999 0.997 0.871 1.000
Accuracy 0.863 0.991 0.983 0.969 0.470 0.998
F1-score 0.860 0.991 0.997 0.968 0.535 0.998

HF: heart failure, AUC: area under curve.

Table 4

Performance of the hospital readmission for HF index model

Logistic regression Tree Random forest Gradient boosting Naïve Bayes Neural networks
AUC 0.992 0.986 0.998 0.958 0.808 0.998
Accuracy 0.961 0.972 0.941 0.894 0.017 0.974
F1-score 0.959 0.967 0.929 0.856 0.010 0.972

HF: heart failure, AUC: area under curve.

Table 5

Comparison of AUCs derived by two studies of various machine learning models

Model AUC
Golas et al. [23] Proposed
Logistic regression 0.664 ± 0.015 0.992
Gradient boosting 0.650 ± 0.011 0.958
Maxout networks 0.695 ± 0.016 -
DUNs 0.705 ± 0.015 -
Decision tree - 0.986
Random forest - 0.998
Naïve Bayes - 0.808
Neural networks - 0.998

Values are presented as mean ± standard deviation.

AUC: area under curve.