Construction of Volume Overload Risk Prediction Model for Heart Failure Patients Based on Machine Learning ()
1. Introduction
Chronic heart failure (CHF) represents one of the major challenges in the field of cardiovascular diseases, characterized by high incidence and mortality rates, imposing a significant burden on patients and their families [1]. Studies indicate that the 30-day readmission rate among CHF patients ranges from 10% to 19.9% [2] [3], while the 6-month readmission rate reaches 24.2% to 32.8% [4]. Volume overload is one of the primary causes of readmission and poor prognosis in CHF patients. The recurrence or exacerbation of congestive symptoms and signs resulting from volume overload serves as a clinical hallmark of CHF deterioration, associated with compromised quality of life, increased hospitalization risks, and elevated mortality rates [5]. Therefore, accurate assessment of volume status in heart failure patients is crucial for improving prognosis, reducing readmission rates, and enhancing quality of life [6]. Traditional evaluation methods primarily rely on clinicians’ experience and routine diagnostic indicators, yet these approaches exhibit limitations in achieving precise individualized assessments. Explanatory machine learning, as an emerging technological tool, enables the identification of underlying patterns and regularities through large-scale data analysis, presenting findings in an interpretable manner to provide robust support for clinical decision-making [7]. This study aims to develop a personalized capacity management status assessment model based on interpretable machine learning and validate its clinical efficacy. It provides healthcare professionals with objective, quantifiable criteria for capacity status evaluation, enabling precise treatment regimen adjustments to timely control disease progression in heart failure patients. The approach enhances therapeutic outcomes and quality of life for heart failure patients, advances medical technology, and offers novel insights and methodologies for related research fields.
2. Materials and Methods
2.1. General Data
Convenience sampling method was employed, with patients hospitalized in the Department of Cardiology of a tertiary Grade A hospital in Jingzhou City from January 2023 to December 2024 serving as study subjects. Inclusion criteria for this study were: 1) Age ≥ 18 years; 2) Patients presenting with symptoms and/or signs of chronic heart failure (CHF) diagnosed as CHF [3]; Exclusion criteria: 1) Incomplete medical records; 2) Exclusion of patients with heart failure caused by other primary cardiac diseases (congenital heart disease, constrictive pericarditis, etc.); 3) Exclusion of patients hospitalized primarily for acute decompensated heart failure or complications of acute myocardial infarction (AMI); 4) Exclusion of patients with concurrent end-stage liver disease (Child-Pugh class C) or end-stage renal disease (eGFR < 15 mL/min or dialysis); 5) Exclusion of patients with expected survival time < 3 months. Sample size calculation was based on conservative estimates derived from literature-reported incidence rates to ensure adequate sample adequacy. This study included 21 predictive variables. All samples were randomly shuffled using R software and allocated in a 7:3 ratio to the training set (1734 cases) and validation set (743 cases). Given the anonymized nature of this dataset, this study does not require obtaining patient informed consent nor approval from institutional review boards. The study strictly adhered to the STROBE (Strengthening of Reporting of Observational Epidemiologic Studies) guidelines.
2.2. Methods
2.2.1. Data Collection Methods
This study established a dedicated research team responsible for data extraction, quality control, and standard validation. The team consisted of 7 members, including 3 cardiologists, 1 clinical nutrition expert, and 3 experienced cardiologists with clinical expertise. Team members ranged in age from 33 to 61 years (median age: 44.7 years); educational qualifications included 2 PhD holders, 4 master’s degree holders, and 1 bachelor’s degree holder; professional titles comprised 3 senior-level titles, 1 associate senior-level title, and 3 intermediate-level titles; and years of professional experience varied from 8 to 35 years (median: 16 years). All members underwent standardized training to ensure consistency in data collection standards. Through literature review, systematic searches, screening, and synthesis of guidelines, expert consensus documents, evidence summaries, systematic reviews, and original studies related to risk factors for CHF patients, the team identified 20 risk factors. These included demographic and anthropometric indicators such as age, gender, body mass index (BMI), educational level, smoking history, and alcohol consumption history; clinical scoring and functional status indicators including the New York Heart Association (NYHA) cardiac function classification and left ventricular ejection fraction (LVEF); comorbidities and diagnostic information such as chronic obstructive pulmonary disease (COPD), gastrointestinal disorders, hypertension, renal insufficiency, diabetes mellitus, and hepatic dysfunction; and laboratory parameters: sodium, potassium, calcium, BNP, albumin and C-reactive protein (CRP). Through the HIS system and LIS system, data of heart failure patients in the Department of Cardiovascular Medicine were extracted, including general information, disease-related information, and laboratory test results. To avoid bias caused by data duplication, only the initial admission records of each patient were retained, and duplicate hospitalization records were excluded. Patients with missing outcome indicators or key clinical variables were also excluded. The criterion for determining volume overload is excessive intracellular water retention (overhydration, OH). The OH value is measured using a body composition analyzer (BCM) according to the classification standards for hemodialysis patients [8]; an OH value > 1.1 L indicates the presence of volume overload. The assessment is conducted at the initial stage of patient admission.
2.2.2. Statistical Methods
Data analysis was performed using R software (version 4.4.1) and Python (version 3.10.4). Missing data were handled using the Winsorization method, with multiple imputation for filling. Normality testing for continuous variables was conducted using the Shapiro-Wilk test. Normally distributed data were expressed as mean ± standard deviation, with intergroup differences compared using t-tests; non-normally distributed data were presented as median and interquartile range, with intergroup differences analyzed using the Wilcoxon rank-sum test. Categorical data were expressed as percentages, with intergroup differences analyzed using chi-square tests or Fisher's exact probability method. To mitigate model overfitting and enhance generalization performance, this study employed Least Absolute Shrinkage and Selection Operator (LASSO) regression with nested 10-fold cross-validation. Variable selection is performed exclusively using data from the training set to prevent data leakage, while internal cross-validation determines the optimal LASSO penalty coefficient λ. The screened variables are subsequently utilized for model construction.
2.2.3. Model Construction and Validation
Based on feature variables selected through LASSO screening, six machine learning models were constructed: Logistic Regression (LR), Random Forest (RF), Decision Tree (DT), eXtreme Gradient Boosting (XGBoost), Support Vector Machine (SVM), and Light Gradient Boosting Machine (LightGBM). Hyperparameter tuning was performed using grid search combined with 10-fold cross-validation. A multivariate Logistic regression model was fitted with LASSO-selected variables as independent variables and volume overload status at admission as the dependent variable. Regression coefficients (β) from this model were used to calculate variable scores (Points) and generate nomograms. The construction principle of nomograms involves converting linear predicted values from Logistic regression equations into visualized scores, aggregating variable scores to obtain total scores, and mapping them to predictive probabilities. Model discriminative ability was evaluated using the area under the receiver operating characteristic curve (AUC). Model stability and generalization capacity were assessed by comparing ROC curves between training and validation sets. The area under the receiver operating characteristic curve (AUC) with 95% confidence intervals (CIs) was calculated to evaluate model discrimination. The DeLong test was performed to statistically compare AUC differences among different machine-learning models. Calibration of each model was assessed using the Brier score, calibration slope and intercept. A lower Brier score indicates better calibration; a calibration slope close to 1 and intercept close to 0 represent optimal probability prediction performance. The selected optimal model was used to predict whether patients would experience volume overload during hospitalization.
3. Results
3.1. General Characteristics of Patients with Chronic Heart Failure
The study included a total of 2477 participants, among whom 1411 (57%) were diagnosed with volume overload. Apart from statistically significant age and calcium differences (P < 0.05) between the training set and validation set, baseline characteristics such as gender, BMI, ejection fraction, albumin levels, and disease history showed no statistically significant differences (P > 0.05). See Table 1.
Table 1. Comparison of baseline data balance between training set and validation set.
Project |
Training Set
(n = 1734) |
Validation Set
(n = 743) |
Statistical Values (t/Z/χ2) |
P Price |
General Information |
|
|
|
|
Age [years,
] |
63.39 ± 11.97 |
68.40 ± 12.51 |
−9.416a |
<0.001 |
Gender (Male) [example, n (%)] |
720 (41.5) |
320 (43.1) |
0.280c |
0.503 |
BMI [(kg/m2),
] |
25.07 ± 5.21 |
25.34 ± 8.93 |
1.504a |
0.334 |
Educational level [example, n (%)] |
|
|
0.176c |
0.668 |
An illiterate person |
309 (17.8) |
119 (16.0) |
|
|
Primary and junior high school |
898 (51.8) |
400 (53.8) |
|
|
High school and vocational school |
356 (20.5) |
148 (19.9) |
|
|
College degree or above |
171 (9.9) |
76 (10.2) |
|
|
Smoking history [example, n (%)] |
437 (25.2) |
207 (27.9) |
1.910c |
0.167 |
Alcohol consumption history [example, n (%)] |
340 (19.6) |
149 (20.1) |
0.757c |
0.841 |
clinical data |
|
|
|
|
LVEF [%,
] |
46.46 ± 7.35 |
46.77 ± 7.31 |
1.034a |
0.332 |
Cardiac function classification (NYHA)
[example, n (%)] |
|
|
0.683c |
0.495 |
I level |
109 (6.3) |
46 (6.2) |
|
|
II level |
456 (26.3) |
184 (24.8) |
|
|
III level |
849 (49.0) |
374 (50.3) |
|
|
IV level |
320 (18.5) |
139 (18.7) |
|
|
Hepatic insufficiency [cases, n (%)] |
397 (22.9) |
183 (24.6) |
0.313c |
0.377 |
Diabetes mellitus [cases, n (%)] |
480 (27.7) |
218 (29.3) |
0.496c |
0.428 |
Hypertension [cases, n (%)] |
969 (55.9) |
407 (54.8) |
0.221c |
0.906 |
Gastrointestinal diseases [cases, n (%)] |
269 (15.5) |
121 (16.3) |
0.201c |
0.672 |
Renal insufficiency [cases, n (%)] |
579 (33.4) |
276 (37.1) |
0.641c |
0.079 |
Laboratory indicators and scoring |
|
|
|
|
CRP [mg/L, M (P25, P75)] |
5.6 (2.8, 15.3) |
5.8 (2.9, 15.9) |
0.232b |
0.816 |
Blood sodium [mmol/L,
] |
138.3 ± 6.18 |
138.1 ± 5.85 |
0.836a |
0.434 |
Blood potassium [mmol/L,
] |
4.23 ± 0.57 |
4.22 ± 0.58 |
0.394a |
0.647 |
Blood calcium [mmol/L,
] |
2.28 ± 0.22 |
2.30 ± 0.21 |
2.141a |
0.032 |
Albumin [g/L,
] |
39.55 ± 6.6 |
40.05 ± 6.35 |
0.152a |
0.093 |
BNP, [ng/L, M (P25, P75)] |
85.0 (45.2, 198.5) |
78.5 (42.3, 185.1) |
0.279b |
0.247 |
Outcome metrics |
|
|
|
|
Volume overload [example, n (%)] |
981 (56.6) |
430 (57.9) |
0.860c |
0.58 |
Note: a represents the t-value; b represents the Z-value; c represents the χ2-value.
3.2. Screening of Predictive
Variables Based on LASSO regression analysis of the training set, 8 variables with non-zero coefficients were selected from the initial 21 variables as final predictive features. These 8 variables include: demographic characteristics (BMI); cardiac function indicators (two NYHA classifications and left ventricular ejection fraction [LVEF]); disease history (chronic obstructive pulmonary disease [COPD]); and laboratory tests (K, Ca, CRP, ALB). This selection not only reflects the pathophysiological mechanisms of volume overload but also considers the accessibility of clinical data. The screened feature subset was subsequently used to construct six machine learning models.
3.3. Construction and Visualization of Predictive
Models Based on 8 predictive variables screened by LASSO regression, a multivariate logistic regression model was constructed to build a column plot of volume overload risk in CHF patients (Figure 1). The model encompasses four dimensions: (1) Electrolyte disturbances: serum potassium (K+), serum calcium (Ca); (2) Cardiac function indicators: cardiac function classification (NYHA), left ventricular ejection fraction (LVEF); (3) Nutrition and inflammatory status: albumin (ALB), C-reactive protein (CRP); (4) Metabolism and comorbidities: body mass index (BMI), chronic obstructive pulmonary disease (COPD).
The column chart employs a score accumulation mechanism: each variable value corresponds to Points ranging from 0 to 100, which are aggregated to Total Points (400 - 600), ultimately mapped to the probability of volume overload occurrence (0.2% - 99.4%). The model transforms complex machine learning algorithms into a visual bedside tool that enables risk assessment within 1 minute without computational equipment. A risk stratification color band is displayed at the bottom of the column chart: green area (probability < 10%) indicates low risk, yellow area (10% - 50%) denotes moderate risk requiring close monitoring, and red area (>50%) signifies high risk necessitating active intervention. This visualization tool enhances the clinical accessibility of machine learning models, providing actionable intelligent decision support for early identification of high-risk populations for volume overload.
![]()
Note: The top red Points axis (0 - 100 points) is used to read variable scores; the middle blue axis represents the clinical value ranges of the 8 predictive variables, with corresponding Points displayed above in red numerals; the green Total Points axis (400 - 600 points) shows cumulative total scores; the bottom purple Probability axis maps final risk probabilities, accompanied by trichromatic risk stratification zones. Usage steps: (1) Locate patient values on the variable axes; (2) Read Points from top; (3) Accumulate to obtain Total Points; (4) Read probabilities from bottom.
Figure 1. Line chart for predicting volume overload risk in patients with chronic heart failure.
model equation:
logit(P) = −4.256 + 0.825 × K + 1.156 × COPD + 0.300 × NYHA − 0.068 × LVEF + 0.045 × BMI − 0.892 × Ca − 0.056 × ALB + 0.012 × CRP
3.4. Model Performance Evaluation and Comparison
The ROC curves of six machine learning models on the training set and validation set are shown in Figure 2 and Figure 3.
Figure 2. ROC curves of each model on the training set.
Figure 3. ROC curves of each model on the validation set.
Validation set performance: Both Random Forest (RF) and LightGBM models achieved an AUC of 0.835 (95%CI: 0.802 - 0.867 and 0.801 - 0.868, respectively), demonstrating the strongest discriminative ability; XGBoost followed closely with an AUC of 0.828 (95%CI: 0.794 - 0.862); Logistic regression showed an AUC of 0.813 (95%CI: 0.778 - 0.848); Decision trees (AUC = 0.703, 95%CI: 0.662 - 0.744) and SVM (AUC = 0.801, 95%CI: 0.765 - 0.837) exhibited relatively weaker performance. DeLong’s test confirmed that RF and LightGBM had significantly higher AUC values than logistic regression (all P < 0.05), verifying their superior predictive performance. Model stability: Comparing the AUC differences between training and validation sets, LightGBM demonstrated the smallest gap of 0.041, indicating optimal generalization capability; Random Forest showed a gap of 0.061, suggesting a tendency toward mild overfitting; Logistic regression exhibited a gap of 0.041, indicating good stability.
Calibration performance of the final models was further assessed by Brier score, calibration slope and intercept. In the validation set, Random Forest yielded a Brier score of 0.142, slope of 0.961, and intercept of −0.023; LightGBM showed a Brier score of 0.140, slope of 0.965, and intercept of −0.021; XGBoost had a Brier score of 0.147, slope of 0.952, and intercept of −0.028; Logistic regression exhibited a Brier score of 0.151, slope of 0.947, and intercept of −0.030. All models achieved favorable calibration, with LightGBM and Random Forest showing the best agreement between predicted probabilities and actual outcomes.
Comprehensive evaluation: Combined with discriminative ability, stability and calibration performance, LightGBM demonstrated optimal overall performance and is recommended as the preferred prediction model. Random Forest achieved the best validation‑set performance but had a larger training‑validation AUC gap. Logistic regression, though slightly inferior to ensemble models, had good stability and calibration, with simplicity and interpretability suitable for clinical application.
4. Discussion
This study successfully constructed a risk prediction model for predicting volume overload in patients with chronic heart failure (CHF) based on machine learning algorithms. Through retrospective analysis of 2477 patients, eight key predictive variables were identified, and six machine learning models—including logistic regression, random forest, decision tree, eXtreme Gradient Boosting, support vector machine, and LightGBM—were compared. The results demonstrated that random forest and LightGBM models exhibited optimal performance in predicting volume overload, with an AUC value of 0.835 and good model stability. Additionally, the risk column plot constructed based on logistic regression provided nomogram with an easy-to-use bedside scoring tool, demonstrating high clinical usability.
4.1. Comparison with Existing Studies
Compared with previous studies, this research represents the first integration of LASSO regression with six machine learning algorithms to identify key features associated with cardiac overload (such as serum potassium, serum calcium, heart rate, LVEF, BMI, etc.) and construct multiple predictive models. Existing studies predominantly focus on traditional clinical scoring systems or the single use of biomarkers, whereas this study enhances predictive accuracy and generalization capabilities by synthesizing multiple clinical, laboratory, and imaging indicators through machine learning algorithms, with particularly outstanding performance observed in random forest and LightGBM models.
In previous studies, Huang et al. [9] employed four machine learning models to predict volume overload in patients with heart failure, achieving an AUC of 0.77. Xu et al. [10] utilized LASSO regression to screen five risk factors from 22 variables and constructed a risk stratification chart for heart failure in coronary heart disease patients (AUC = 0.727). In contrast, the LightGBM model in our study demonstrated an AUC of 0.835, indicating superior predictive performance. This highlights the potential of machine learning algorithms in predicting volume overload.
Additionally, Misumi et al. [11] developed a 4V-RS score: systolic blood pressure, blood urea nitrogen, blood chloride and C-reactive protein for acute heart failure patients using LASSO regression in 2024, with a validation set AUC of 0.783, which was comparable to the predictive performance of the multivariate model in this study. However, this study only included four variables, whereas our study screened eight key factors from 21 variables using LASSO, covering electrolyte disturbances (K+, Ca), cardiac function (NYHA class, LVEF), nutritional inflammation (ALB, CRP), comorbidities (COPD), and metabolic factors (BMI), thereby providing a more comprehensive reflection of the pathophysiological mechanisms of volume overload.
4.2. Model Selection and Interpretability
Both random forest and LightGBM demonstrated high AUC values (0.835) in this study while exhibiting strong stability. The machine model investigated by Hu et al. [12] for predicting rehospitalization in heart failure patients showed an outstanding AUC value of 0.87 using the random forest (RF) model, consistent with our findings. However, some studies hold differing perspectives. For instance, Su et al. [13] initially described the characteristics of random forests, noting that inter-tree correlations may lead to overfitting, particularly in high-dimensional feature spaces. Although both models are excellent, LightGBM demonstrates slightly superior performance in model stability and generalization ability. This aligns with our conclusions: while random forest achieves performance comparable to LightGBM on the validation set, significant differences between training and validation datasets suggest potential mild overfitting. Therefore, despite their comparable performance, LightGBM exhibits slight advantages in model stability and generalization capabilities.
While the Logistic regression model demonstrates slightly lower AUC values, its strong interpretability makes it particularly suitable for clinical translation. According to the predictive model development guidelines published by Xu et al. [10], when simple models exhibit comparable performance to complex models, the former should be prioritized. Therefore, we constructed risk column charts using Logistic regression models, transforming intricate predictive processes into user-friendly tools for clinicians while balancing predictive accuracy and operational feasibility. Furthermore, research by Iasonos et al. [14] confirms that nomogram as visual representations of predictive models significantly enhance clinicians’ willingness to adopt them and improve decision-making efficiency.
4.3. Clinical Application Prospects and Practical Significance
The 2021 ESC Guidelines for Heart Failure emphasized that early identification of volume overload is critical for guiding diuretic use and reducing rehospitalization rates [15]. The risk nomogram presented in this study aligns perfectly with this clinical need. The volume overload risk prediction model provided in this study, particularly the LightGBM-based model and Logistic regression risk column charts, demonstrates excellent clinical operability. Previous research by Hu et al. [12] employed machine learning models to predict rehospitalization in heart failure patients, where New York Heart Association NYHA class and HF classification were identified as significant risk factors, which overlap with the influencing factors in the column charts of this study. This indicates that the model can assist clinicians in identifying high-risk populations during early hospitalization stages, enabling personalized interventions that may reduce unnecessary hospitalizations and treatment costs. By providing real-time prediction of volume overload risk, physicians can adjust treatment strategies based on risk stratification: low, intermediate and high risk, such as timely diuretic escalation or fluid management modifications, thereby improving patient outcomes.
Furthermore, the model’s visualization tools such as nomogram can be utilized in clinical settings without requiring complex equipment, which aligns with the recommendations of Collins et al. [16] regarding predictive model reporting standards (TRIPOD Statement), emphasizing the clinical usability and interpretability of models. Future developments may include smartphone applications based on these column-line charts to enable automated scoring and risk alerts, significantly enhancing the efficiency of clinical diagnosis and treatment. This approach facilitates convenient and rapid clinical decision-making, substantially improving the overall effectiveness of diagnostic and therapeutic processes.
4.4. Limitations and Prospects
This study has several limitations. Firstly, the data source was single-center and retrospective in nature, which may introduce sample selection bias and limit the external generalizability of the findings. Secondly, the absence of certain clinical data could potentially affect model performance. Although variable screening was conducted using LASSO regression, not all factors influencing volume overload, such as long-term medication history and specific treatment regimens, were included. Additionally, the study was limited to patients with chronic heart failure, and its applicability to acute decompensated heart failure requires further validation. Future research should prioritize multicenter prospective validation to assess the model's generalizability across different regions and populations. Furthermore, with advancements in big data technology, incorporating multidimensional data such as genomic data could enhance model accuracy and predictive power. To improve practical utility, integrating such predictive models with clinical decision support systems CDSS could enable more intelligent patient management.
5. Conclusions
LightGBM and random forest models demonstrated optimal performance, with LightGBM exhibiting both high predictive efficacy (AUC = 0.835) and good generalization capability, making it suitable as a rapid screening tool for high-risk patients with volume overload. Cardiac function classification, albumin levels, and BMI are key factors influencing volume overload. The column-line diagram constructed based on logistic regression is intuitive and user-friendly, making it suitable for clinical application.
This model facilitates early clinical identification of patients at high volume load risk, guides individualized fluid management and therapeutic decisions, and holds potential application value in improving prognosis of chronic heart failure patients as well as optimizing nursing and medical resource allocation. Future multicenter prospective studies are required to further validate and promote its clinical implementation.