synthetic-ae-demand-xgboost
This model is trained entirely on synthetic data. It is a demo/portfolio project showing an end-to-end XGBoost forecasting pipeline, styled after an A&E (emergency department) daily-demand forecasting problem. No real patient or NHS data was used anywhere in this project.
Model description
XGBoost regressor predicting a synthetic daily "attendance" count from calendar features and rolling averages.
Features: day of week, day of year, weekend flag, synthetic-holiday flag, 7-day and 28-day rolling averages.
Training data
Synthetic daily time series generated locally with weekly seasonality
(higher on weekends), annual seasonality (winter peak), a mild upward trend,
occasional synthetic "holiday" spikes, and Gaussian noise. Generation code is
included in this repo (generate_synthetic_ae_data) so the data is fully
reproducible and inspectable.
Evaluation results
(on a chronological 80/20 train/test split of the synthetic data)
- MAE: 6.271
- RMSE: 8.163
- R²: 0.83
- Train / test size: 1200 / 300
Intended use & limitations
Demo/portfolio use only. Because the training data is synthetic, this model has no predictive value for real-world emergency department demand and should not be used for anything operational or clinical.
How to use
import xgboost as xgb
model = xgb.XGBRegressor()
model.load_model("model.json")
preds = model.predict(X) # X must have the same feature columns as training