Quantile Forecasts
Learn how to generate forecasts at different probability levels to quantify uncertainty.
Quantile Forecasts
Forecasting often goes beyond a single point estimate. Quantile forecasts offer a distribution that communicates uncertainty, allowing for better decision-making and planning.
In forecasting, users are frequently interested in a range of possible future values rather than one “best guess.” Quantile forecasts achieve this by estimating specific percentiles of the forecast distribution. For example, saying “We predict that 90% of air passenger observations will be greater than 100” makes the uncertainty around forecasts more transparent.
TimeGPT uses conformal prediction to generate a complete distribution of forecasts. By extracting specific quantiles—like 25th and 75th percentiles—we can gain insights into where the forecast may lie. The 50th quantile (median) is a central estimate which can also help in planning while considering uncertainty.
Distribution of predictions
Going beyond a point forecast means planning with high and low scenarios in mind.
Conformal prediction
This method helps generate reliable intervals for forecasts by wrapping model outputs in a predictive distribution.
Quantile utility
Different quantiles can answer questions about worst- or best-case scenarios.
1. Import Packages
Import the required packages and initialize a Nixtla client to connect with TimeGPT.
2. Load Data
Load the air passengers dataset and do a quick preview to confirm it’s loaded correctly.
3. Forecast with Quantiles
Specify the quantiles you would like to retrieve, and perform a forecast with TimeGPT.
TimeGPT returns columns in the form TimeGPT-q-...
for each requested quantile.
Choose quantiles based on the range of uncertainty you want to capture for your planning or decision-making needs.
Plot the forecasts:
An example quantile forecast visualization
4. Historical Forecast
Add historical forecasts to analyze past performance at various quantiles.
Example historical forecast visualization
5. Cross Validation
Compute quantile forecasts using cross-validation to evaluate how forecasts perform across multiple time windows.
Then visualize forecasts for each cross-validation cutoff:
Cross-validation plot for a single cutoff
Repeat for each cutoff to compare forecasts across multiple windows.
Congratulations! You have successfully generated quantile forecasts using TimeGPT, visualized historical predictions, and performed cross-validation. You now have a flexible framework to capture prediction uncertainty for better decision-making.