SDE & MLE Prep

Time-Series Forecasting

Q: How would you forecast demand / traffic?

  • Baselines first: last value, seasonal naive (same hour last week), moving averages — surprisingly hard to beat.
  • Decompose into trend + seasonality + residual; check stationarity (differencing, log transform).
  • Classical: exponential smoothing (Holt-Winters), ARIMA/SARIMA, Prophet (trend + seasonality + holidays).
  • ML: GBDTs on lag features (t−1, t−7, t−364), rolling means, calendar features, holidays, promotions — the workhorse for many related series; deep models (DeepAR, temporal fusion transformers, N-BEATS) and pretrained time-series foundation models for large collections.
  • Evaluation: rolling-origin backtesting (train on the past, test on the next window, slide forward) — never random splits; metrics MAE, MAPE (breaks near zero), sMAPE, quantile loss for intervals.
  • Forecast intervals, not just points (quantile regression), and watch for regime changes (holidays, outages, pandemics).