A machine-learning model for accurate diuresis prediction in acute heart failure (DRC-AHF) Authors: Gracjan Iwanek, Mateusz Guzik, Amadeusz Oleszczak, Iga Karbowiak, Dominik Marciniak, Matteo Pagnesi, Julio Nuñez, Robert Zymliński, Piotr Ponikowski, Jan Biegus Published: 2026 ABSTRACT AbstractIntroductionWe aimed to develop a machine learning-based tool for accurate quantitative prediction of diuretic response in acute heart failure (AHF).MethodsWe prospectively enrolled 296 AHF patients (20% female, mean age 68 ± 13 years, mean estimated glomerular filtration rate (eGFR) 62 ± 30 ml/min/1.73m2, median NT-proBNP 7112 [4082–14 400] pg/ml) in a single-centre derivation/validation study. A random forest regression model was developed using derivation (n = 50) and optimization (n = 246) cohorts and externally validated in an independent cohort (n = 50; mean age 69 ± 14 years, mean eGFR 56 ± 27 ml/min/1.73m2). Predictors were eGFR, spot urine sodium (uNa), and urine creatinine (uCr) obtained 2 h after intravenous furosemide.ResultsIn the validation cohort (n = 50), the median observed 6 h urine output was 1220 [950–1750] ml vs model-estimated 1446 [957–1749] ml (P = .480). Observed and estimated values showed a strong positive correlation (r = 0.90, 95% CI: 0.83–0.94, P < .0001), with a mean absolute error of 413 ml and a mean bias of 67 ± 383 ml on the Bland–Altman analysis. The model correctly classified 44/50 patients (88%) into predefined diuresis categories (≤900, 900–1800, and ≥1800 ml), compared with 58% for the reference natriuretic response prediction equation. Mean absolute error decreased progressively by approximately 200 ml per 100 additional patients, confirming data-driven performance improvement.ConclusionsA three-variable machine learning model (eGFR, uNa, and uCr at 2 h post-diuretic) predicted 6 h urine output with high accuracy in AHF and demonstrated adaptive improvement with expanding training data. The calculator is freely available at https://diuresis.umw.edu.pl. Introduction Since antiquity, early physicians considered urine as a product derived from blood, providing insight into organ function and the status of the circulatory system. In modern medicine, the assessment of urine output, particularly in the context of systemic perfusion, continues to carry critical clinical information.1 By its nature, urine volume and composition are intrinsically linked, providing information on organ function, perfusion, and neurohormonal activity.2 Acute heart failure is a condition that, in approximately 80% of cases, is characterized by congestion resulting from fluid accumulation and redistribution.3 The cornerstone of therapy for this clinical presentation, consistently since the 1960s, has been diuretic treatment with loop diuretics.4 The goal of diuretic therapy is the rapid and safe removal of excess accumulated fluid from the body. Optimizing diuretic response is important, and the European Society of Cardiology (ESC) Guideline recommended intervention for controlled decongestion in acute heart failure (AHF), yet it has been proven challenging.5The multifactorial nature of diuretic response, including many patient-related factors [like estimated glomerular filtration rate (eGFR), age, blood pressure, serum sodium, volaemia] and external factors (such as diuretic dose, previous diuretic use, concomitant medication, etc.),6–8 complicates easy predictions of diuresis at the bedside. This has created a long-lasting belief that accurate prediction of diuresis after diuretic administration is almost impossible. Traditional approaches to measuring diuretic efficacy, such as spot urine sodium concentration (uNa), provide valuable but limited insights due to their binary and single-factor nature.9 Moreover, most of these biomarkers are used to identify poor diuretic responders, while quantitative urine output information is less reliable.10,11 Accurate urine volume prediction may be extremely useful, as it could be incorporated into prospective, proactive decongestion management algorithms, thereby increasing the safety of the decongestion process and reducing medical staff workload. Moreover, based on reliable urine volume calculations, early identification of high-risk patients and optimization of therapy can be implemented more easily and efficiently in a personalized manner.12 Both abovementioned arguments—early identification of patients with a poor diuretic response and effective decongestion—have prognostic significance in AHF.8,13 In our previous studies, we demonstrated that the relationship between urine volume and UNa is not linear but rather logarithmic. Using a single-variable estimator in this context failed to capture the true nature of this correlation. To address this, we incorporated spot urine creatinine concentration (UCr) as a marker of urine dilution.11 Adding this second parameter allowed us to describe the diuretic response more accurately. We derived the UNa/UCr ratio, which transformed the diuretic response curve into a linear trajectory and outperformed guideline-recommended UNa in predicting poor diuretic response.14 Based on our observations and using the known variables listed above that influence the diuretic response, we performed a mathematical analysis aimed at developing a diuretic response calculator. Ultimately, we obtained a complex polynomial equation with variables included eGFR, uNa, and uCr. The results we obtained were consistent with already known solutions such as natriuretic response prediction equation (NRPE).15,16 Given the presence of a multidimensional biological relationship and the known limitations of conventional mathematical models, we decided to employ machine learning methods to characterize these dependencies.17 Our research aimed to develop a machine learning-based, adaptive, tool for rapid, accurate direct prediction of diuretic response in AHF (DRC-AHF—diuretic response calculator in AHF), quantified as cumulative urine output over 6 h following loop diuretic administration. Methods Study population This is a single-centre, prespecified, prospective observational (derivation/validation) study performed at the Institute of Heart Diseases between January 2022 and September 2025. Acute heart failure was defined according to the criteria of the European Society of Cardiology (ESC).5 All adult patients (> 18 years) who consented to participate by signing an informed consent form and were hospitalized with AHF as the leading cause of hospitalization and treated with intravenous diuretics were recruited. Exclusion criteria included the following: cardiogenic shock, diagnosis of acute coronary syndrome, end-stage renal disease requiring renal replacement therapy, need for inotropic support, and contraindications for urinary catheterization. Per the attending physicians’ recommendations, patients were treated in accordance with the current ESC guidelines. This study was approved by the local ethics committee (Komisja Bioetyczna, Wroclaw Medical University, KB 88/2021) and conducted in accordance with the Declaration of Helsinki and Good Clinical Practice. Study design Each patient’s detailed information (demographics, previous medical history, and medication) was collected before the study onset. Patients without a urinary catheter had one placed. Blood and urine samples were collected for laboratory testing. At the beginning of the study, each patient received an intravenous dose of furosemide, determined by the attending physician based on clinical assessment. From that point, hourly urine output was measured for the next 6 h. After 2 h of the examination, a spot urine sample was collected for laboratory analysis. These laboratory measurements were utilized for estimation DRC preparation. Laboratory measurements All the laboratory parameters were measured in our institutional, certified laboratory. Serum creatinine and urine creatinine were assessed using the modified Jaffe method, and sodium urine concentration was assessed using a sodium ion-selective electrode. Analyses were performed on Abbott Alinity equipment. Estimated glomerular filtration rate was calculated using the Modification of Diet in Renal Disease formula. Patient stratification by diuretic response The study population was stratified into three groups based on their cumulative diuretic response over 6 h: Poor diuretic response group: cumulative 6 h diuresis ≤ 900 ml Poor diuretic response group: cumulative 6 h diuresis ≤ 900 ml Moderate diuretic response group: cumulative 6 h diuresis 900–1800 ml Moderate diuretic response group: cumulative 6 h diuresis 900–1800 ml Good diuretic response group: cumulative 6 h diuresis ≥ 1800 ml Good diuretic response group: cumulative 6 h diuresis ≥ 1800 ml The lower limit was derived from the ESC Guidelines and HFA Consensus Document.1,4 The second cut-off was derived by doubling the previous one. The classification was used to assess the accuracy of the future estimation model. Model implementation The DRC was developed in Python 3.11. Random forest regression was implemented using scikit-learn 1.7, and XGBoost 3.2 and LightGBM 4.6 were used for gradient boosting benchmarks. Data preprocessing and analysis used pandas and NumPy. Visualizations were generated with Matplotlib. All analyses were conducted using Jupyter notebooks. Hyperparameter optimization was performed via scikit-learn’s GridSearchCV with parallelized execution (n_jobs=−1). A fixed random seed (random_state=8) was used for reproducibility across all stochastic operations.18–21 Statistical analysis Statistical analyses were performed using STATISTICA 13 (StatSoft) and Prism 10, version 10.4.0 (GraphPad Software, Boston, MA) software. The normality of variable distributions was evaluated using the Kolmogorov–Smirnov, Lilliefors, and Shapiro–Wilk tests. Normal probability plots were also utilized for a visual assessment of distribution normality. Continuous variables with a normal distribution were presented as means ± standard deviations, while those with a skewed distribution were reported as medians with interquartile ranges [Q25-Q75]. Categorical variables were described as numbers and percentages. Differences between characteristics of independent groups (Table 2) were assessed according to data distribution. For normally distributed continuous variables (e.g. age, BMI), comparisons were performed using the unpaired Student’s t-test. For non-normally distributed continuous variables (e.g. NT-proBNP, cumulative 6 h diuresis), the Mann–Whitney U test was applied. Categorical variables (e.g. proportion of patients naïve to loop diuretics) were compared using the Pearson’s χ2 test. For paired data (observed vs estimated 6 h cumulative urine output), the Wilcoxon signed-rank test was used. Agreement between observed and estimated values was assessed using the Bland–Altman analysis, and their relationship was evaluated using the Pearson’s correlation coefficient. Model performance was evaluated using standard regression error metrics, including mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE). In addition, to assess the ability of the models to classify patients into three predefined diuretic response categories, the area under the receiver operating characteristic curve (AUROC) was calculated in a multiclass setting using both one-vs-rest (OvR) and one-vs-one (OvO) approaches. Results Study population The population consisted of 296 patients, predominantly men (80%), with a mean age of 68 ± 13 years. The mean ejection fraction was 37 ± 15%, median NTproBNP was 7112 [4082–14 400] pg/ml, and mean eGFR was 62 ± 30 ml/min/1.73 m2. The uNa at 2 h was 106 [82–120] mmol/l (Table 1). Table 1Baseline characteristics of the study populationParameterPopulationNumber of patients296Sex, male235 (79%)Age, years68 ± 13BMI, kg/m231 ± 7Heart failure, de novo89 (30%)Left ventricular ejection fraction, %37 ± 15Heart failure with reduced ejection fraction185 (63%)Heart failure with mildly reduced ejection fraction29 (10%)Heart failure with preserved ejection fraction82 (28%)NTproBNP, pg/ml7112 [4082–14 400]eGFR, ml/min/1.73m262 ± 30Spot urine sodium at 2 h, mmol/l106 [82–120]Spot urine creatinine at 2 h, mg/dl16 [8–31]Cumulative 6 h diuresis [ml]1620 [1000–2400] Medication on admission ACEI/ARB145 (49%) Beta-blockers214 (72%) Aldosterone antagonist122 (41%) ARNI35 (12%) SGLT-2 inhibitors119 (40%) Loop diuretics naïve patients98 (33%) Loop diuretics198 (67%) Furosemide equivalent, mg80 [80–100] Devices Pacemaker25 (9%) Implantable cardioverter-defibrillator37 (12%) Cardiac resynchronization therapy with defibrillator11 (4%)ACEI, angiotensin-converting enzyme inhibitor; ARB, angiotensin receptor blocker; BMI, body mass index; eGFR, estimated glomerular filtration rate; NT-proBNP, N-terminal prohormone of brain natriuretic peptide; SGLT-2 inhibitors, sodium-glucose cotransporter-2 inhibitors. Baseline characteristics of the study population ACEI, angiotensin-converting enzyme inhibitor; ARB, angiotensin receptor blocker; BMI, body mass index; eGFR, estimated glomerular filtration rate; NT-proBNP, N-terminal prohormone of brain natriuretic peptide; SGLT-2 inhibitors, sodium-glucose cotransporter-2 inhibitors. The median furosemide dose was 80 [80–100] mg. There were 69 (23%) patients who had a poor diuretic response (cumulative urine output ≤900 ml during the first 6 h), 99 patients (34%) who had a moderate diuretic response (cumulative urine output between 900 and 1800 ml), and 128 patients (43%) with a good diuretic response (cumulative urine output ≥1800 ml). The validation cohort consisted of 50 patients (eight from Brescia and Valencia, and the rest recruited at our institution after the algorithm was completed), with a mean age of 69 ± 14 years, a mean left ventricular ejection fraction of 29 ± 7%, a median NTproBNP of 6539 [4266–12 661] pg/ml, and a mean eGFR of 56 ± 27 ml/min/1,73 m2 . The uNa at 2 h was 103 [81–117] mmol/l. Patients received a median furosemide dose of 80 [60–80] mg. In the external validation cohort, there were 12 (24%) patients with poor diuretic response (cumulative urine output ≤900 ml during the first 6 h), 27 (54%) patients had moderate diuretic response (urine output 900–1800 ml), and 12 (24%) patients had good diuretic response (cumulative urine output ≥1800 ml). Model selection Seven regression models were compared after independent hyperparameter optimization. Gradient-boosted tree models achieved the best overall cross-validation (CV) MAE: LightGBM (454 ± 54 ml) and XGBoost (462 ± 52 ml). Linear regression and elastic net performed substantially worse (590 and 589 ml, respectively), indicating that the relationship between raw input features and 6 h diuresis is non-linear and benefits from tree-based modelling approaches. Random forest was retained as the final model based on two considerations: (1) it achieved the lowest MAE among clinically critical patients (≤900 ml diuresis): 316 ± 61 ml, compared to 344–594 ml for all alternatives and (2) it achieved the lowest MAPE (33.6% vs 35–52%), indicating superior relative accuracy across the full output range. The external validation cohort (n = 50) confirmed the model’s accuracy with MAE = 413 ml. A detailed comparison of the candidate models is presented in Supplementary Table S1. Model design and development Baseline characteristics and detailed data on the diuretic response of 296 consecutive AHF patients were prospectively collected and included in the dataset for model development. The dataset was divided into two cohorts: derivation (n = 50), optimization (n = 246). Initially, data from the first 50 patients (derivation cohort) were used to construct the model. Subsequently, additional patients (from the optimization cohort) were incrementally added to the training set as part of the optimization process. After incorporating each patient’s data from the optimization cohort, the optimized model’s accuracy was tested each time on an independent group of patients—the internal validation cohort. This iterative (i + 1) process was completed when the training set included 296 patients (training set consisting of derivation and optimization cohort). Patients were incorporated into the model in order of their enrolment in the study. Finally, the data from all patients were incorporated into the final version of the model (training and test set). This process is illustrated in Figure 1. Diuretic response calculator construction flowchart. The dataset was divided into two cohorts: derivation (n = 50) and optimization (n = 246) and then validated on validation set (n = 50). The model was initially built using the derivation cohort, with optimization cohort data added incrementally to the training set. At each step, accuracy was tested on the validation cohort. This process continued until the training set included 296 patients (derivation + optimization cohorts). Finally, the full dataset (n = 346) was used to develop the final model The baseline clinical differences between training (derivation and optimization) and test (validation) cohorts are presented in Table 2. Table 2Differences in clinical parameters between the training and tested groupsParameterTraining setN = 296Testing setN = 50 P-valueSex, male235 (79%)40 (80%).922Age, years68 ± 1369 ± 14.768BMI, kg/m231 ± 7.229 ± 7.204Left ventricular ejection fraction, %37 ± 1534 ± 13.349Heart failure, de novo89 (30%)13 (26%).560Loop diuretics naïve patients111 (38%)15 (30%).308NTproBNP, pg/ml7112 [4082–14 400]6539 [4266–12 661].888eGFR, ml/min/1.73 m262 ± 3056 ± 27.632Spot urine sodium at 2 h, mmol/l106 [82–120]103 [81–117].968Spot urine creatinine at 2 h, mg/dl16 [8–31]15 [11–29].669Cumulative 6 h diuresis [ml]1620 [1000–2400]1220 [950–1750].057BMI, body mass index; eGFR, estimated glomerular filtration rate; NT-proBNP, N-terminal prohormone of brain natriuretic peptide. Differences in clinical parameters between the training and tested groups BMI, body mass index; eGFR, estimated glomerular filtration rate; NT-proBNP, N-terminal prohormone of brain natriuretic peptide. Covariates selected for the model Based on statistical and mathematical modelling (including correlations, regression, and the search for more sophisticated functions describing the relationship between diuresis and selected groups of variables), several candidate covariates were identified as significantly associated with 6 h diuresis. The candidate variables included diuretic use status (naïve vs chronic diuretic user), furosemide dose, uNa, uCr, uK, uCl, uUrea at 2 h, baseline serum creatinine, eGFR, and sodium, NTproBNP, age, and sex. The candidate covariates were then modelled and further tested in the algorithm. The highest algorithmic accuracy was achieved using the following variables: uNa at 2 h, uCr at 2 h, and eGFR, which were selected for the final model. Interestingly, furosemide dose and loop diuretic status (naïve vs de novo) showed minimal predictive value (feature importance <0.05). Impact of each covariate on the algorithm prediction (weight of each algorithm covariate) Among the variables included in the model, uCr at 2 h had the greatest impact on the estimation (∼77%), while the baseline eGFR (∼11%) had the lowest impact (Table 3). Table 3Feature importances for model predictionVariableImportanceuCr at 2 h (mg/dl)0.768uNa at 2 h (mmol/l)0.121eGFR baseline (ml/min/1,73m2)0.111eGFR, estimated glomerular filtration rate; uCr, spot urine creatinine at 2 h; uNa, spot urine sodium at 2 h. Feature importances for model prediction eGFR, estimated glomerular filtration rate; uCr, spot urine creatinine at 2 h; uNa, spot urine sodium at 2 h. The importance of uNa was ∼12%. It is important to note that the model is built as a decision forest, implying that each variable is essential for its accuracy. Predictive accuracy and reliability of the DRC The DRC’s MAE and RMSE (measures of the model’s imprecision) decreased as the size of the training set increased (during the optimization process). The model trained on 296 patients reached MAE and RSME equal to 413, 571 ml, respectively (Figure 2). This indicates that the DRC’s accuracy reached a mean (absolute value of) difference between the observed and estimated cumulative 6 h urine volume of 413 ml. Diuretic response calculator effectiveness and data-driven improvement abilities based on the number of training points. The graph illustrates the model’s accuracy as a function of its size (number of included patients x-axis) and error (y-axis), expressed using two primary study measurements: mean absolute error (MAE) and root mean squared error (RMSE). For the analysed model (training set = 296 and testing set = 50), these values are 413 and 571 ml, respectively. This indicates that, in the studied population, the average absolute value of the difference between the observed diuresis and the diuresis estimated by the model is 413 ml. Importantly, the model’s accuracy improves as the number of included patients increases, as both MAE and RMSE decrease with increasing number of patients The estimated 6 h cumulative diuresis was strongly and significantly correlated with the observed, measured diuresis, r = 0.90, 95% CI: 0.83–0.94, P < .0001 (Figure 3). Spearman correlation for the test group. Observed diuresis vs estimated diuresis. Correlation between observed and estimated diuresis (ml). The scatterplot shows the relationship between observed diuresis (x-axis) and estimated diuresis (y-axis) with a strong positive correlation (r = 0.90, 95% CI: 0.83–0.94, P < .0001). The solid line represents the line of best fit, indicating the accuracy of the model’s predictions Projected DRC accuracy Due to the algorithm’s unique characteristics—the ability to adapt to new data and adapt new data based on already imputed observed measured 6 h urine volumes and algorithm performance, it is possible to model the further development of the algorithm’s precision. Figure 4 depicts the projected dynamics of the algorithm’s continued improvement in accuracy. Estimated diuretic response calculator precision improvement as a function of the number of incorporated training points. The estimated improvement in model precision is represented by a mathematically fitted function describing the relationship between the mean absolute error (MAE, y-axis) and the number of patients included in the model (training points, x-axis). As this number increases, the MAE decreases, indicating an improvement in model accuracy. The presented graph is a mathematical approximation. Achieving a zero value is biologically impossible, primarily due to a number of methodological limitations, including errors arising from model construction (diuresis measurement error, biological sample collection, and laboratory analyses errors) as well as individual biological variability Based on the model, including additional patients in the algorithm is projected to yield a logarithmic increase in accuracy. The mean absolute error progressively decreased by approximately 200 ml per 100 patients (Figure 4). Predicted vs observed urine volumes In the validation group, the median cumulative 6 h urine volume was 1220 [950–1750] ml, while the estimated urine volume was 1446 [957–1749] ml, P = .480. There were 12 (24%) patients with urine output ≤900 ml, 27 (54%) with diuresis between 900 and 1800 ml, and 12 (24%) with diuresis ≥1800 ml. The algorithm correctly classified by diuretic response ranges in 44 out of 50 (88%) patients in the validation cohort (Figure 5). Accuracy of the diuretic response calculator by clinical diuretic response. The graph illustrates the model’s accuracy as a function of observed diuresis (x-axis) and estimated diuresis (y-axis). The background of the chart displays ranges of observed diuretic response: red represents the poor diuretic response group (cumulative 6 h diuresis ≤ 900 ml), orange represents the moderate diuretic response group (cumulative 6 h diuresis 900–1800 ml), and green represents the good diuretic response group (cumulative 6 h diuresis ≥ 1800 ml). Data points corresponding to observed vs estimated 6 h diuresis are plotted on this background. The points are colour-coded based on the estimated diuresis, following the same scheme as the background. When the colour of the point matches the colour of the background, it indicates consistency between the observed and estimated diuresis in terms of the assigned diuretic response range. Of the 50 patients, 44 (88%) were appropriately classified according to their diuretic response Notably, most of the algorithm’s errors were in patients whose urine volume was at the border between the two groups. The Bland–Altman analysis showed good agreement between measured and estimated values (mean bias 67 ± 383 ml) (Figure 6C). Comparison of the diuretic response calculator performance with the reference method. The model’s predictive abilities outperformed the reference method [natriuretic response prediction equation (NRPE)]. The left side of the figure corresponds to the presented model, while the right side represents the reference method (NRPE). (A, B) Accuracy as a function of observed diuresis (x-axis) and estimated diuresis (y-axis) in the tested group. (C, D) The Bland–Altman analysis. Supplementary information related to this figure is provided in Table 4 Comparison of the DRC’s performance with the reference method The DRC’s predictive performance outperformed the reference method (NRPE) in the validation group. Notably, there was a significant difference between the observed cumulative 6 h urine output and the values obtained by NRPE estimation: 1220 [950–1750] ml vs 795 [480–1411] ml, P < .001. Natriuretic response prediction equation also misclassified a diuretic response range in a higher percentage of patients (42%) than our algorithm did. Consistently, multiclass classification analysis based on macro-averaged AUROC (OvR and OvO) demonstrated superior overall performance of the DRC, while NRPE showed relatively preserved discrimination but poor calibration. In cross-validation (n = 296), the DRC achieved a multiclass classification accuracy of 76.0%. In the independent validation cohort (n = 50), the model correctly classified 88% of patients into predefined diuretic response categories, compared with 58% for the NRPE formula. The higher accuracy observed in the validation cohort should be interpreted with caution given the relatively small sample size. (Table 4, Figure 6). Table 4Comparison of the diuretic response calculator performance with the reference method in validation groupObservedDRCNRPECumulative 6 h diuresis [ml]1220 [950–1750]1446 [957–1749]795 [480–1411]Proper classification into diuretic response groups, %44/50 (88%)29/50 (58%)MAE, ml413482RMSE, ml571596MAPE, %27%34%Bland–Altman analysis, ml67 [−684–818]−402 [−1274–470]Pearson correlation, r, 95% CI0.90 [0.83–0.94], p < .00010.86 [0.76–0.92], p < .0001CV accuracy, %76%24%OvR macro AUROC, 95% CI0.887 [0.871–0.903]0.727 [0.702–0.752]OvO macroAUROC, 95% CI0.906 [0.891–0.919]0.882 [0.854–0.919]OvR AUROCPoor diuretic response group, 95% CI0.919 [0.899–0.936]0.903 [0.869–0.938]OvR AUROCModerate diuretic group, 95% CI0.819 [0.793–0.846]0.389 [0.325–0.456]OvR AUROCGood diuretic group, 95% CI0.923 [0.903–0.940]0.888 [0.840–0.930]AUROC, area under the receiver operating characteristic curve; CV, cross-validation; DRC, diuretic response calculator; MAE, mean absolute error; MAPE, mean absolute percentage error; NRPE, natriuretic response prediction equation; OvO, one vs one; OvR, one versus rest; RMSE, root mean squared error. Comparison of the diuretic response calculator performance with the reference method in validation group AUROC, area under the receiver operating characteristic curve; CV, cross-validation; DRC, diuretic response calculator; MAE, mean absolute error; MAPE, mean absolute percentage error; NRPE, natriuretic response prediction equation; OvO, one vs one; OvR, one versus rest; RMSE, root mean squared error. Discussion We believe that our study leads to several important conclusions. Firstly, we have provided an innovative, comprehensive, and widely accessible tool for accurate estimation of the diuretic response in AHF. The calculator is available at https://diuresis.umw.edu.pl, and we hope to make it available soon as a mobile phone application as well. Secondly, our data suggest that, despite the biological complexity of diuretic response and longstanding beliefs, the diuretic response in AHF can be precisely estimated from the first post-diuretic urine sample. Additionally, we demonstrated that a machine-learning model created with precisely selected, predefined variables can provide a solution where traditional statistical and mathematical methods have previously failed. This has immense practical significance. So far, the common use of deep learning and machine learning has been intended to enable researchers to observe non-obvious relationships. Our approach presents a different perspective. We used simple, standard-of-care measures, linked them to a continuous variable (urine volume), and, with the help of machine learning (decision tree), created a ‘formula’ for an estimation. Notably, our first attempts to develop a sophisticated mathematical formula to predict urine output failed. It is important to note that we were not the first to develop a tool for predicting diuretic response; however, we worked concurrently and independently from other groups and ideas. Testani et al. previously derived a gold-standard formula based on physiological principles that can be used for such estimations.22 This formula is also a core component of an ongoing clinical trial and was successfully externally validated.16,23 This supports our assumption that such a calculator is needed and can be widely used. Significantly, as stated above, our algorithm differs from the existing one in principle, as it is based on machine learning. What we believe is key, given its construction, is capacity for its performance improvement with an increasing number of tested patients. Interestingly, our algorithm outperformed the aforementioned reference method across all evaluated parameters, which, combined with its data-driven improvement properties, offers promise for even better results in the future. Our results confirm that the prospective collection of high-quality data will improve the model’s accuracy. Therefore, we hope to find collaborators who can provide such quality data in the future and help further validate and develop the algorithm. As the imprecise or flawed data may lead to the opposite effect. The parameters we use to evaluate the model’s effectiveness (MAE, MAPE) consistently decreased as the number of observations increased, confirming data-driven performance improvement of the model. The mean (absolute value of) difference between the observed and estimated cumulative 6 h urine volume at the moment is 413 ml. From a clinical perspective, our primary goal was to maximize prediction accuracy within the <900 mL urine output range, as the algorithm was penalized more heavily for errors in this range. This approach resulted in overestimation in the highest urine output range (≥1800 ml/6 h), which increased the average error but had limited clinical significance. Speaking of precision, it should be remembered that the number of objective variables limits the precision of such algorithms and calculations in general. Firstly, several, even tiny imprecisions, like laboratory test variance, imprecise, subjective urine volume read by the investigator, etc., lower and limit the model accuracy. Most importantly, we face individual biological variability, meaning that in the real world, two individuals with the same values of eGFR, uNa, and uCr are very unlikely to have identical 6 h urine outputs, although their volumes should be very similar. Given this, our tool will never provide a perfect match between the observed and observed values but will aim to minimize error as much as possible. Several studies have linked natriuresis to more effective decongestion and better prognosis in patients with AHF.9,14,24 Cut-off thresholds have been proposed, and natriuresis has become the goal of studies using new diuretic treatment protocols.15,25,26 Although the most effective so far, this approach is not free from limitations. Diuretic response is a complex, multi-factorial biological process. In purely mathematical terms, we would describe this relationship as a polynomial, with each coefficient representing a biological factor contributing to the diuretic response to some extent. Urine sodium concentration does not provide a direct, linear relationship with urine volume.11 This represents a binary simplification of a continuous process with significant individual variability. Interestingly, in our approach, we do not move away from assessing natriuresis; instead, we enrich it by combining analyses of markers of urine dilution and kidney function.27 To our surprise, the algorithm allocated much higher weight to the uCr than the uNa. With the increasing incidence of AHF, rising healthcare costs,28 and a persistent shortage of medical personnel, hourly assessment of diuretic response in the hospital setting can be challenging and may impose an additional burden on healthcare staff. The use of a diuretic response calculator substantially reduces this workload, as a single urine sample provides equivalent information. Moreover, it eliminates the need for urinary catheterization, thereby reducing patient discomfort and the risk of catheter-associated infections.29 Accurate measurement of urine output volume has significant clinical value. Previous methods have primarily focused on identifying patients with poor diuretic response. However, obtaining an exact urine output volume provides an absolute value that aids the attending physician. This enables optimization of diuretic therapy, not only for patients with poor diuretic response but also for those who respond well. Identifying patients with a good diuretic response may allow for better adjustment of the diuretic dose. This approach aligns well with the concept of personalized AHF therapy.27 We also hope that this tool will pave the way for creating precise therapeutic (diuretic) algorithms that will enable the up-front determination of diuretic requirements (based on objective measures) and guide further treatment. Lastly, in the future, the AI algorithm may also be used to objectively determine oral diuretic requirements in chronic HF, as this is currently left to the physician to make a very subjective decision.27 The clinically most desirable solution would be the development of a diuretic response calculator capable of predicting treatment response based solely on baseline parameters. However, given the dynamic and multifactorial nature of diuretic response, achieving such a tool appears unlikely. To date, several approaches have been proposed that use baseline assessment to identify patients at high risk of diuretic resistance.30,31 Despite their advantages, these methods still leave a substantial ‘grey zone’ of patients with a moderate diuretic response. We believe that, considering the complexity of diuretic response, these approaches and DRC may act in a complementary manner—enabling early identification of high-risk patients, who can then be prospectively and more precisely evaluated using our tool. The diuretic response calculator provides an excellent background for further randomized trials. Proper diuretic management in patients with AHF yields measurable benefits and, as previous studies have shown, can be conducted without the direct involvement of an attending physician once planned. Limitations This study has several limitations. First, it is a single-centre study with a limited number of participants (especially in the validation cohort), focused solely on Caucasian patients recruited in Central Europe; therefore, its effectiveness in other populations remains to be evaluated. Nevertheless, from an AI/machine-learning perspective, allocating approximately 10% of the total sample to a validation subset is a standard, methodologically acceptable approach. Since the diuretic response may vary among patients from different countries and aetiologies, the external validity of the algorithm is currently limited and needs further research. Nevertheless, we plan to establish a multicentre, international collaboration to prospectively optimize the model’s performance across diverse countries and regions. On the other hand, we need to emphasize that at this stage of the tool development, high-quality data and meticulous diuresis measurements are essential to ensure the robustness and reliability of the algorithm, which, in fact, supports the single-centre design of our current study. Based on three parameters (uNa, uCr, ad eGFR), the diuretic response calculator attempts to capture a complex, multifactorial biological process and may not achieve the estimated efficacy. Furthermore, furosemide was the only loop diuretic used in the study which at this stage of the analysis precludes extrapolation of the results to other loop diuretics. The algorithm needs urine sample analysis to predict future diuretic response. Conclusions Here, we demonstrated a machine-learning-based algorithm that precisely estimates 6 h urine output using three basic variables: eGFR, uNa, and uCr measured 2 h after furosemide administration. The data-driven model demonstrated improved performance, with accuracy increasing as the number of examined patients increased, and outperformed the reference method. Further research, optimization, and development of the algorithm in a multicentre environment will enhance the external validity of the proposed solution. Supplementary Material