The 30-days hospital readmission risk in diabetic patients: predictive modeling with machine learning classifiers

Yujuan Shang, Kui Jiang, Lei Wang, Zheqing Zhang, Siwei Zhou, Yun Liu, Jiancheng Dong, Huiqun Wu

Abstract

Hospital readmission within 30 days is a critical indicator of healthcare quality and represents a significant financial burden. This study develops a predictive framework for readmission risk among diabetic patients using a large-scale dataset of 100,244 records. By evaluating Random Forest (RF), Naive Bayes (NB), and Tree Ensemble (ET) classifiers within the KNIME platform, the research identifies Random Forest as the superior model. Key findings highlight the importance of secondary diagnoses and prior inpatient history in predicting risk, offering a low-code pathway for clinical implementation.

Introduction

For patients with diabetes mellitus (DM), 30-day readmission rates are notably high, ranging from 14.4% to 22.7%. These rates are driven by the complexity of glycemic control and various comorbidities. Predicting which patients are at high risk before discharge is challenging due to the inherent "class imbalance" in clinical data—where the majority of patients are not readmitted. This study addresses this gap by building robust machine learning models to identify high-risk individuals, enabling timely clinical interventions.

Methodology

The researchers employed the Konstanz Information Miner (KNIME) platform to compare three distinct machine learning approaches:

  1. Random Forest (RF): An ensemble method using multiple decision trees.
  2. Naive Bayes (NB): A probabilistic model based on feature independence.
  3. Tree Ensemble (ET): A method combining multiple decision trees to improve generalization.

To address the fact that only ~11% of the population experienced 30-day readmission, the study tested two balancing strategies: SMOTE (oversampling) and Equal Size Sampling (down-sampling). Feature engineering was also critical, reducing hundreds of ICD-9 codes into 16 consolidated diagnostic categories.

Dataset Characteristics

The study utilized 100,244 records from the Health Facts Database (Cerner Corporation, US) spanning 1999 to 2008. After preprocessing, 23 modeling risk factors were retained from an initial set of 55 attributes.

Figure 1: Distribution of gender and race within the study dataset.

As shown in Figure 1, the dataset is predominantly Caucasian (77.08%) and slightly skewed toward female patients (53.79%).

Key Insights and Results

The Random Forest (RF) model consistently outperformed other classifiers. Using a down-sampling strategy, RF achieved an AUC of 0.661 for 30-day readmission and an AUC of 0.686 for general future readmission.

Predictor Importance

A significant finding was that the secondary diagnosis (diag_2) was a stronger predictor than the primary diagnosis. This suggests that the overall clinical complexity of a diabetic patient is more indicative of readmission risk than the acute reason for the initial visit.

Figure 3: Gender distribution of medication use across different count bins.

The model identified a "high-risk" profile: elderly patients with frequent emergency department visits and initial hospital stays exceeding five days (which correlates with an 87% higher risk compared to stays of two days or less). Figure 3 illustrates the distribution of medication use, another key clinical factor integrated into the model.

The top five influential features were:

  1. Number of inpatient admissions
  2. Age
  3. Number of emergencies
  4. Secondary diagnosis (diag_2)
  5. Sex

Conclusion

This research demonstrates that machine learning, specifically Random Forest models, can effectively flag diabetic patients at risk for short-term readmission. By utilizing accessible platforms like KNIME, these insights can be integrated into clinical workflows without requiring deep programming expertise. Future research will focus on incorporating more recent data and refining the impact of specific comorbidities on readmission timelines.

Summary updated

Abstract

Background and objectives Diabetes mellitus is a major chronic disease that results in readmissions due to poor disease control. Here we established and compared machine learning (ML)-based readmission prediction methods to predict readmission risks of diabetic patients. Methods The dataset analyzed in this study was acquired from the Health Facts Database, which includes over 100,000 records of diabetic patients from 1999 to 2008. The basic data distribution characteristics of this dataset were summarized and then analyzed. In this study, 30-days readmission was defined as a readmission period of less than 30 days. After data preprocessing and normalization, multiple risk factors in the dataset were examined for classifier training to predict the probability of readmission using ML models. Different ML classifiers such as random forest, Naive Bayes, and decision tree ensemble were adopted to improve the clinical efficiency of the classification. In this study, the Konstanz Information Miner platform was used to preprocess and model the data, and the performances of the different classifiers were compared. Results A total of 100,244 records were included in the model construction after the data preprocessing and normalization. A total of 23 attributes, including race, sex, age, admission type, admission location, length of stay, and drug use, were finally identified as modeling risk factors. Comparison of the performance indexes of the three algorithms revealed that the RF model had the best performance with a higher area under receiver operating characteristic curve (AUC) than the other two algorithms, suggesting that its use is more suitable for making readmission predictions. Conclusion The factors influencing 30-days readmission predictions in diabetic patients, including number of inpatient admissions, age, diagnosis, number of emergencies, and sex, would help healthcare providers to identify patients who are at high risk of short-term readmission and reduce the probability of 30-days readmission. The RF algorithm with the highest AUC is more suitable for making 30-days readmission predictions and deserves further validation in clinical trials.
BibTeX
@article{shang2021days,
  author = {Yujuan Shang and Kui Jiang and Lei Wang and Zheqing Zhang and Siwei Zhou and Yun Liu and Jiancheng Dong and Huiqun Wu},
  title = {{The 30-days hospital readmission risk in diabetic patients: predictive modeling with machine learning classifiers}},
  journal = {BMC Medical Informatics Decis. Mak.},
  year = {2021},
  doi = {10.1186/s12911-021-01423-y},
}
Figure