Predicting hospital outpatient volume using XGBoost: a machine learning approach.
Lingling Zhou1, Qin Zhu1, Qian Chen1
1Department of Information, Daping Hospital, Army Medical University, Chongqing, 400042, China.
Scientific Reports
|May 16, 2025
Summary
Predicting hospital outpatient volume using XGBoost machine learning offers superior accuracy. This method effectively integrates environmental factors and healthcare resources for better operational efficiency.
Area of Science:
- Health Informatics
- Environmental Health
- Machine Learning in Healthcare
Background:
- Hospital outpatient volume is influenced by environmental conditions and healthcare resource availability.
- Accurate prediction of outpatient demand is crucial for operational efficiency and resource allocation.
- Existing forecasting models may not fully capture the complex interplay of factors affecting outpatient volume.
Purpose of the Study:
- To develop and evaluate a predictive model for daily hospital outpatient volume using the XGBoost algorithm.
- To compare the performance of XGBoost against Seasonal AutoRegressive Integrated Moving Average with exogenous regressors (SARIMAX) and Random Forest (RF) models.
- To identify key factors influencing hospital outpatient demand.
Main Methods:
- Utilized daily climate data (temperature, precipitation, PM2.5), historical outpatient volumes, and outpatient specialist numbers from January 1, 2014, to October 31, 2024.
- Preprocessed data included handling missing values and encoding categorical variables.
- Assessed model performance using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and R-squared (R²).
Main Results:
- The XGBoost model demonstrated superior predictive accuracy over SARIMAX and RF models.
- XGBoost achieved the lowest MAE, RMSE, and MAPE, and the highest R².
- Significant predictors included the number of outpatient specialists, temporal variables, average temperature, and PM2.5 levels.
Conclusions:
- XGBoost is a highly effective machine learning algorithm for predicting hospital outpatient volume.
- Accurate demand forecasting enables proactive resource allocation and improved hospital service capacity.
- Integrating environmental and resource data enhances the precision of outpatient volume predictions.
Related Concept Videos
Residuals and Least-Squares Property
7.2K
The vertical distance between the actual value of y and the estimated value of y. In other words, it measures the vertical distance between the actual data point and the predicted point on the line
If the observed data point lies above the line, the residual is positive, and the line underestimates the actual data value for y. If the observed data point lies below the line, the residual is negative, and the line overestimates the actual data value for y.
The process of fitting the best-fit...
If the observed data point lies above the line, the residual is positive, and the line underestimates the actual data value for y. If the observed data point lies below the line, the residual is negative, and the line overestimates the actual data value for y.
The process of fitting the best-fit...
7.2K
Prediction Intervals
2.2K
The interval estimate of any variable is known as the prediction interval. It helps decide if a point estimate is dependable.
However, the point estimate is most likely not the exact value of the population parameter, but close to it. After calculating point estimates, we construct interval estimates, called confidence intervals or prediction intervals. This prediction interval comprises a range of values unlike the point estimate and is a better predictor of the observed sample value, y.
However, the point estimate is most likely not the exact value of the population parameter, but close to it. After calculating point estimates, we construct interval estimates, called confidence intervals or prediction intervals. This prediction interval comprises a range of values unlike the point estimate and is a better predictor of the observed sample value, y.
2.2K
Hospitals-II
724
Hospitals provide inpatient and outpatient services. Inpatient services provide care to patients that stay in the hospital for an extended period, ranging from days to months. Examples of inpatient services include intensive care units, hospital wards, or surgeries. Outpatient services provide care to patients who come to a hospital for a diagnostic or treatment but do not stay overnight —for example, diagnostic tests, surgical procedures, or health education.
Nurses that work in...
Nurses that work in...
724
End Point Prediction: Gran Plot
205
A Gran plot is used to predict the equivalence volume or endpoint of a potentiometric or acid-base titration without reaching the endpoint. Typically, titration data is collected as a function of the titrant's volume up to a point less than the equivalence volume and then transformed into a linear format. The straight line is extended to the x-axis, indicating the necessary titrant volume to achieve the equivalence point.
For potentiometric titration, the Gran plot is created by plotting...
For potentiometric titration, the Gran plot is created by plotting...
205
Outliers and Influential Points
3.9K
An outlier is an observation of data that does not fit the rest of the data. It is sometimes called an extreme value. When you graph an outlier, it will appear not to fit the pattern of the graph. Some outliers are due to mistakes (for example, writing down 50 instead of 500), while others may indicate that something unusual is happening. Outliers are present far from the least squares line in the vertical direction. They have large "errors," where the "error" or residual is the...
3.9K
What Are Outliers?
3.6K
Outliers are observed data points that are far from the least squares line. They have unusual values and need to be examined carefully. Though an outlier may result from erroneous data, at other times, it may hold valuable information about the population under study and should be included in the data. Hence, it is crucial to examine what causes a data point to be an outlier.
The z score is used to find outliers or unusual values. It should be noted that any values beyond -2 and +2 are...
The z score is used to find outliers or unusual values. It should be noted that any values beyond -2 and +2 are...
3.6K


