Learn how to use the detect_anomalies_online method for real-time anomaly detection in streaming time series data with TimeGPT.
1. Set up your environment
2. Configure your NixtlaClient
base_url
argument:3. Load your dataset
Server Data with Spike Anomaly
4. Detect anomalies in real time
detect_anomalies_online
method to identify anomalies by leveraging TimeGPT’s forecasting capabilities.Anomaly Detection Log Output
View last 5 anomaly detections
unique_id | ts | y | TimeGPT | anomaly | anomaly_score | TimeGPT-hi-99 | TimeGPT-lo-99 |
---|---|---|---|---|---|---|---|
machine-1-1_y_29 | 2020-02-01 22:11:00 | 0.606017 | 0.544625 | True | 18.463266 | 0.553161 | 0.536090 |
machine-1-1_y_29 | 2020-02-01 22:12:00 | 0.044413 | 0.570869 | True | -158.933850 | 0.579404 | 0.562333 |
machine-1-1_y_29 | 2020-02-01 22:13:00 | 0.038682 | 0.560303 | True | -157.474880 | 0.568839 | 0.551767 |
machine-1-1_y_29 | 2020-02-01 22:14:00 | 0.024355 | 0.521797 | True | -150.178240 | 0.530333 | 0.513261 |
machine-1-1_y_29 | 2020-02-01 22:15:00 | 0.044413 | 0.467860 | True | -127.848560 | 0.476396 | 0.459325 |
Identified Anomalies
5. Next steps
detect_anomalies_online
—including parameter tuning and strategies for fine-tuning anomaly detection—stay tuned for our upcoming tutorial.