# SARIMAX Model for M5 Demand Forecasting ## Overview Seasonal ARIMA with eXogenous variables trained on aggregated daily M5 sales data. ## Model Details - **Architecture**: SARIMAX(2,1,1)(1,1,1,7) - **Training Data**: 1,913 days with 6 exogenous features - **Test Period**: 28 days (2016-04-25 to 2016-05-22) - **Exogenous Variables**: wday, month, snap_CA, snap_TX, snap_WI, has_event ## Performance | Metric | Value | |--------|-------| | RMSE | 2,759.70 | | MAE | 2,260.25 | | MAPE | 4.98% | | AIC | 35869.68 | ## Key Features - Captures autocorrelation and seasonal patterns - Exogenous variables provide additional signal - Weekly seasonality (s=7) for day-of-week effects - Event indicators (holidays, SNAP days) improve accuracy ## Usage ```python import pickle import pandas as pd with open('model.pkl', 'rb') as f: model = pickle.load(f) forecast = model.forecast(steps=28, exog=exog_future) ``` ## Notes - Best performance among the three statistical models - Exogenous variables (especially SNAP indicators) significantly improve predictions - Larger model size (85MB) due to seasonal components