Multiple Series Forecasting
Learn how to generate forecasts for multiple time series simultaneously.
Multiple Series Forecasting
TimeGPT provides straightforward multi-series forecasting. This approach enables you to forecast several time series concurrently rather than focusing on just one.
• Forecasts are univariate: TimeGPT does not directly account for interactions between target variables in different series.
• Exogenous Features: You can still include additional explanatory (exogenous) variables like categories, numeric columns, holidays, or special events to enrich the model.
Given these capabilities, TimeGPT can be fine-tuned to your own datasets for precise and efficient forecasting. Below, let’s see how to use multiple series forecasting in practice:
Key Concept
Global models like TimeGPT can handle multiple series in a single training session and produce a separate forecast for each.
Benefit
Multi-series learning improves efficiency, leveraging shared patterns across series that often lead to better forecasts.
1. Install and import packages
Install and import the required libraries, then initialize the Nixtla client.
2. Load the data
You can now load the electricity prices dataset from various European markets. TimeGPT automatically treats it as multiple series based on the unique_id
column.
Now, let’s visualize the data using the NixtlaClient.plot()
method.
Electricity Markets Series Plot
3. Forecast multiple series
Pass the DataFrame to the forecast()
method. TimeGPT automatically handles each unique series based on unique_id
.
When using Azure endpoints, specify model="azureai"
. By default, the timegpt-1
model is used. See the
details here for available models.
Visualize the forecasts:
Multiple Series Forecast Plot
4. Generate historical forecasts
You can also produce historical forecasts (including prediction intervals) by setting add_history=True
. This allows you to compare previously observed values with model predictions.
Congratulations! You have successfully performed multi-series forecasting with TimeGPT, taking advantage of its global modeling approach.