Key result
XGBoost machine learning predicts hospital length of stay within ~0.8 days from admission data.
Why the study?
Administrative databases offer rich clinical information for hospital length of stay prediction at admission, but strong heterogeneity across care units makes accurate prediction challenging.
Effect estimate: R2 0.88
Boosting-based machine learning models, particularly cost-sensitive variants, provide strong and stable hospital length of stay predictions from administrative data, improving the capture of rare long-stay cases.
May support hospital resource planning; leaves open prospective validation before clinical use.
Accurate prediction of hospital length of stay (LoS) at admission is essential for bed management, staffing, and resource allocation. Administrative databases such as the French Programme de Médicalisation des Systèmes d’Information (PMSI) offer rich clinical information but exhibit strong heterogeneity across care units, making prediction challenging.We propose a cost-sensitive ensemble learning framework for LoS prediction in a multi-unit, imbalanced setting. The study includes 16,590 inpatient episodes across cardiology, general medicine, pediatrics, and neonatology, using only admission-level features. We evaluate Random Forest, Gradient Boosting, and Extreme Gradient Boosting (XGBoost), together with cost-sensitive variants of XGBoost based on inverse-frequency, square-root, and logarithmic weighting schemes, tested across α ∈ { 0.5,1,2 } . Performance is assessed using MAE, MAPE, R 2 , and extreme-LoS evaluation (LoS ≥ 8 days). XGBoost achieves the best global performance (MAE = 0.80 days, R 2 = 0.88 ). Cost-sensitive variants show comparable global accuracy (best MAE = 0.80); a small subset of configurations exhibit statistically significant but practically negligible differences in error distribution relative to the baseline (bootstrap confidence intervals overlapping; rank-biserial effect sizes ≤ 0.15 ). However, they systematically reshape the error distribution, producing selective improvements in rare long-stay cases depending on weighting formulation and intensity. In the extreme-LoS subgroup, models achieve MAE as low as 0.41 days and over 93% of predictions within a one-day error margin, with stable performance across configurations. Results also reveal substantial heterogeneity across clinical units, with better predictability in adult units than in pediatric and neonatal settings. Overall, boosting-based models provide strong and stable LoS predictions from administrative data, while cost-sensitive learning offers a mechanism to better capture clinically critical rare events without sacrificing global accuracy.
No takes yet. Share an insight, caveat, or question.
Mekhaldi et al. (2026) studied Inpatient admission (n=16,590). Cost-sensitive ensemble learning framework (XGBoost) vs. Standard machine learning models was evaluated on Hospital length of stay prediction performance (MAE) (R2 0.88). An XGBoost-based machine learning framework accurately predicted hospital length of stay from admission data (MAE = 0.80 days, R2 = 0.88), with cost-sensitive variants improving long-stay predictions.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: