DeepAR: Probabilistic Forecasting with RNNs
What you'll learn: How DeepAR transforms RNN forecasting from predicting single numbers to predicting entire probability distributions over future values.
The Core Innovation
Traditional RNN forecasters output point estimates—single predicted values for each time step. DeepAR changes the game by having the RNN output parameters of a probability distribution instead. Rather than saying "tomorrow's sales will be 100 units," DeepAR says "tomorrow's sales follow a distribution with mean μ=100 and standard deviation σ=15."
This autoregressive approach means each prediction feeds back as input for the next step, but instead of feeding back a single number, you sample from the predicted distribution.
How It Works
Think of DeepAR like a weather forecaster who doesn't just predict "75°F tomorrow" but gives you "70-80°F with 80% confidence." At each time step:
- The LSTM/GRU processes historical data plus the previous prediction
- It outputs distribution parameters (e.g., μ and σ for Gaussian, or λ for Poisson)
- You sample from that distribution to get the next input
- Repeat autoregressively for the entire forecast horizon
The network is trained by maximizing the likelihood of the observed data under the predicted distributions—not minimizing mean squared error.
Why This Matters
Probabilistic forecasts let you quantify uncertainty naturally. You get prediction intervals (10th to 90th percentile) directly from the model. This is crucial for inventory planning, resource allocation, or any scenario where understanding risk matters as much as the central prediction.
Key Takeaway: DeepAR extends RNN forecasting from point estimates to full probability distributions by having the network output distribution parameters and training via likelihood maximization, enabling uncertainty quantification in sequential predictions.