NixtlaClient
.
๐ Use an Azure AI endpoint To use an Azure AI endpoint, set thebase_url
argument:nixtla_client = NixtlaClient(base_url="you azure ai endpoint", api_key="your api_key")
unique_id | ds | y | |
---|---|---|---|
0 | 0 | 2007-12-10 | 9.590761 |
1 | 0 | 2007-12-11 | 8.519590 |
2 | 0 | 2007-12-12 | 8.183677 |
3 | 0 | 2007-12-13 | 8.072467 |
4 | 0 | 2007-12-14 | 7.893572 |
unique_id | ds | y | TimeGPT | TimeGPT-hi-99 | TimeGPT-lo-99 | anomaly | |
---|---|---|---|---|---|---|---|
0 | 0 | 2008-01-10 | 8.281724 | 8.224187 | 9.503586 | 6.944788 | False |
1 | 0 | 2008-01-11 | 8.292799 | 8.151533 | 9.430932 | 6.872135 | False |
2 | 0 | 2008-01-12 | 8.199189 | 8.127243 | 9.406642 | 6.847845 | False |
3 | 0 | 2008-01-13 | 9.996522 | 8.917259 | 10.196658 | 7.637861 | False |
4 | 0 | 2008-01-14 | 10.127071 | 9.002326 | 10.281725 | 7.722928 | False |
๐ Available models in Azure AI If you are using an Azure AI endpoint, please be sure to setAs you can see,model="azureai"
:nixtla_client.detect_anomalies(..., 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
.
False
is assigned to โnormalโ values, as they fall
inside the confidence interval. A label of True
is then assigned to
abnormal points.
We can also plot the anomalies using
NixtlaClient
.
date_features
argument. We can set it to True
and it will generate all possible features from the given dates and
frequency of the data. Alternatively, we can specify a list of features
that we want. In this case, we want only features at the month and
year level.
level
argument. This
takes any values between 0 and 100, including decimal numbers.
Reducing the confidence interval resutls in more anomalies being
detected, while increasing it will reduce the number of anomalies.
Here, for example, we reduce the interval to 70%, and we will notice
more anomalies being plotted (red dots).