Work

Forecasting Emergency Room Patient Volumes Using Extreme Gradient Boosting With Temporal and Seasonal Feature Engineering: A Comparative Study Across Hospitals

Year: 2025
Type: article
Abstract: OBJECTIVE: Accurate forecasting of emergency department (ED) patient volumes is critical for optimizing hospital resource allocation and staffing. This preliminary study evaluates the performance of an eXtreme Gradient Boosting (XGBoost)-based regression model in predicting daily ED visit counts across three simulated hospitals, using time-series features derived from synthetic hospital data retrieved from a publicly available Kaggle dataset (n=300). METHODS: For each hospital, we trained an XGBoost model using engineered temporal features, recent lagged values, and rolling averages of past patient volumes. Feature engineering included day of the week, month, week of the year, quarter of the year, and weekend status. Model performance was benchmarked against three general baselines: a naive lag-1 predictor, a constant mean predictor, and a three-day rolling mean. Performance was assessed using mean squared error (MSE), root MSE (RMSE), mean absolute error (MAE), and R² score. RESULTS: The XGBoost model consistently outperformed all baseline methods across all hospitals. For Hospital 101, it achieved an R² of 0.55 compared to 0.27 for the rolling mean and negative R² values for naive and mean baselines. Hospital 102 showed improved accuracy with an R² of 0.69 versus 0.12 for the rolling mean. The best performance was observed at Hospital 103, where XGBoost achieved an R² of 0.81, significantly outperforming all baselines. Across all sites, XGBoost reduced RMSE and MAE by more than 40% relative to the best-performing baseline. CONCLUSION: Leveraging temporal and historical patterns in simulated ED data, the XGBoost model delivers markedly more accurate volume forecasts than traditional baseline methods. These findings on synthetic data support the potential for machine learning-based forecasting models in enhancing hospital operational decision-making, with future directions involving the use of real-world hospital data.
Source: Cureus
Authors: Kian A Huang, William M Hardin, Neelesh S Prakash
Language: English
Open Access status: diamond
OpenAlex ID: W4411420660
FWCI: 2.509
Cites: 17
Cited by: 2
Related to: 10