NixtlaClient
to use TimeGPT.
👍 Use an Azure AI endpoint To use an Azure AI endpoint, remember to set also thebase_url
argument:nixtla_client = NixtlaClient(base_url="you azure ai endpoint", api_key="your api_key")
unique_id | ds | y | |
---|---|---|---|
0 | AP-AP | 2023-10-01 04:00:00+00:00 | 4042.513 |
1 | AP-AP | 2023-10-01 05:00:00+00:00 | 3850.067 |
8784 | DOM-DOM | 2023-10-01 04:00:00+00:00 | 10732.435 |
8785 | DOM-DOM | 2023-10-01 05:00:00+00:00 | 10314.211 |
17568 | JC-JC | 2023-10-01 04:00:00+00:00 | 1825.101 |
17569 | JC-JC | 2023-10-01 05:00:00+00:00 | 1729.590 |
26352 | PN-PN | 2023-10-01 04:00:00+00:00 | 1454.666 |
26353 | PN-PN | 2023-10-01 05:00:00+00:00 | 1416.688 |
35136 | RTO-RTO | 2023-10-01 04:00:00+00:00 | 69139.393 |
35137 | RTO-RTO | 2023-10-01 05:00:00+00:00 | 66207.416 |
forecast
method. Here, we use fine-tuning and
specify the mean absolute error (MAE) as the fine-tuning loss. Also, we
use the timegpt-1-long-horizon
since we are forecasting the next two
days, and the seasoanl period is one day.
📘 Available models in Azure AI If you are using an Azure AI endpoint, please be sure to setTimeGPT was done in 4.3 seconds! We can now plot the predictions against the actual values of the test set.model="azureai"
:nixtla_client.forecast(..., model="azureai")
For the public API, we support two models:timegpt-1
andtimegpt-1-long-horizon
. By default,timegpt-1
is used. Please see this tutorial on how and when to usetimegpt-1-long-horizon
.
neuralforecast
.