Skip to main content
Use SHAP when someone asks:
Why did TimeGPT produce this forecast?
SHAP starts from a reference forecast and shows how much each input moves the prediction up or down.
The values use the same unit as your target. If you forecast product demand, a contribution of +2 means two additional units in the model’s forecast.

Retail-demand example

A store uses its price, promotion plan, and temperature forecast to predict demand for the next 14 days.

Make and explain the forecast

Turn on feature_contributions when you call forecast():
The forecast for the first promotion day is:
The frame always has the ID and time columns, TimeGPT, one column per feature in the order they were sent, and base_value last.

Read the result

For January 6:
  • The explanation starts at 91.85 units.
  • Price adds 0.21 units.
  • The planned promotion adds 0.55 units.
  • Temperature subtracts 0.59 units.
  • Together, they produce the 92.01-unit forecast after rounding.
A retail-demand forecast beside a bar chart showing the contribution of price, promotion, and temperature

The left panel shows the 14-day forecast. The right panel explains the first promotion day. Results were generated with TimeGPT 2.1.

A positive contribution pushes the forecast above its starting value. A negative contribution pushes it below. Neither sign is inherently good or bad; it simply describes the direction of the model prediction.

Find the biggest contributors

To summarize the entire forecast horizon, calculate the average absolute contribution:
Use the row-level values when investigating a particular day. Use the average when you need a quick view across the complete forecast.
SHAP explains how TimeGPT combined the available inputs for this forecast. Use it to investigate surprising predictions, communicate forecasts, and decide where to look next.

Next