Learn how to use the TimeGPT long-horizon model for forecasting far into the future with Nixtla client.
timegpt-1-long-horizon
model in TimeGPT.
timegpt-1-long-horizon
model. Simply specify model="timegpt-1-long-horizon"
when calling nixtla_client.forecast
.1. Import Packages
base_url
parameter as well:nixtla_client = NixtlaClient(base_url="your azure ai endpoint", api_key="your api_key")
2. Load the Data
y
):Download Progress & Logging
Download Progress & Logging
Sample Rows
unique_id | ds | y | |
---|---|---|---|
0 | OT | 2016-07-01 00:00:00 | 1.460552 |
1 | OT | 2016-07-01 01:00:00 | 1.161527 |
2 | OT | 2016-07-01 02:00:00 | 1.161527 |
3 | OT | 2016-07-01 03:00:00 | 0.862611 |
4 | OT | 2016-07-01 04:00:00 | 0.525227 |
3. Forecasting with the Long-Horizon Model
timegpt-1-long-horizon
model is optimized for predictions far into the future. Specify it like so:Forecast Logging
model="azureai"
:
nixtla_client.forecast(..., model="azureai")
TimeGPT Long-Horizon Forecast with 90% Confidence Intervals
4. Evaluation
Evaluation Results
0.146
, indicating strong performance for these longer-range forecasts.