Leveraging Big Data, Weather Insights, and the XGBoost ML Model to Better Forecast Medication Demand and Manage Shortages

Read the full article See related articles

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Background Medication shortages are a critical public health issue, exacerbated by inaccurate demand forecasting, particularly for medicines with irregular demand patterns. External factors like weather conditions may influence demand variability, offering an avenue for improving predictive accuracy. Methods This study utilized 10 years of medication prescription data from the NHS English Prescribing Dataset (EPD) and weather data from the Meteostat API. The focus was on immunological products and vaccines, as these demonstrated high variability in demand and frequent stockouts. Weather variables (temperature, precipitation, wind speed, etc.) and their lagged values were used as predictors in machine learning (ML) models: Linear Regression, Random Forest, and XGBoost. Model performance was evaluated using metrics such as R², RMSE, and MAE. Results XGBoost emerged as the best-performing model, with an R² of 0.80, RMSE of 324.61, and MAE of 117.69, outperforming Random Forest (R² = 0.67) and Linear Regression (R² = 0.04). The analysis highlighted the significant role of lagged weather variables, such as minimum temperature and precipitation, in predicting demand for immunological products. Conclusions The study demonstrates the potential of incorporating weather data into ML models to improve medication demand forecasting, particularly for medicines with irregular demand patterns. XGBoost offers a robust framework for mitigating medication shortages through accurate, dynamic demand prediction.

Article activity feed