Forecast vs Actuals
MASE by Department & Model
MASE < 1 beats seasonal naive — most departments clear that bar; department 1_3 is an outlier driven by a mid-test spike. Lower is better; best per department highlighted in blue.
| Department | XGBoost | ETS | SNAIVE |
|---|
What the Chart Tells Us
XGBoost Feature Importance — Top 15
What These Features Mean
Hyperparameter Grid
Average MASE for each (tree_depth × learn_rate) combination. Green = better, red = worse. All 9 cells are measured values — each is the mean MASE across 7 departments when the model was refit at that exact depth × learn_rate combination. Green = better.
The Quiet Lesson
Data Footnote
Dataset: timetk::walmart_sales_weekly, 7 departments at a single Walmart store × 143 weekly observations (Feb 2010 – Oct 2012). XGBoost trained as a single global model across all departments (one-hot id), spec configuration trees=500, min_n=10, tree_depth=6, learn_rate=0.01, sample_size=0.8 via the tidymodels interface. Baselines: SNAIVE (m = 52) and ETS via forecast::stlf() (STL + ETS, used instead of raw forecast::ets() which caps seasonal period at 24). Horizon: 12 weeks (last 12 observations held out; split date 2012-08-10). MASE is computed against the in-sample seasonal-naive MAE at m = 52. The 3×3 hyperparameter grid above is measured — each cell is the mean MASE across the 7 departments when the model was refit at that depth × learning-rate combination.