Historical Forecast Evaluation
Learn how to validate TimeGPT models by comparing historical forecasts against actual data.
Our time series model offers a powerful feature that allows you to retrieve historical forecasts alongside prospective predictions. You can access this functionality by using the forecast method and setting add_history=True
.
Historical forecasts can help you understand how well the model has performed in the past. This view provides insight into the modelβs predictive accuracy and any patterns in its performance.
Key Benefit
Adding historical forecasts (add_history=True
) lets you compare model predictions against actual data, helping to identify trends.
When to Use Historical Forecasts
Useful for performance evaluation, model reliability checks, and building trust in the predictions.
Key Benefit
Adding historical forecasts (add_history=True
) lets you compare model predictions against actual data, helping to identify trends.
When to Use Historical Forecasts
Useful for performance evaluation, model reliability checks, and building trust in the predictions.
1. Import Required Packages
Use an Azure AI endpoint
If you want to use an Azure AI endpoint, set the base_url
argument:
2. Load the Dataset
Time Series Plot
3. Generate Historical Forecast
Inspection
Review the first rows of the historical predictions:
timestamp | TimeGPT | |
---|---|---|
0 | 1951-01-01 | 135.483673 |
1 | 1951-02-01 | 144.442398 |
2 | 1951-03-01 | 157.191910 |
3 | 1951-04-01 | 148.769363 |
4 | 1951-05-01 | 140.472946 |
Compare Observed & Predicted
Plot the observed time series against both historical and future predictions for a consolidated view:
Historical and Future Predictions Plot
Note that initial values of the dataset are not included in the historical forecasts. The model needs a certain number of observations before it can begin generating historical predictions. These early points serve as input data and cannot themselves be forecasted.