docs/en/06-advanced/06-tdgpt/06-anomaly-detection/02-statistics-approach.md
| Parameter | Description | Required? | Default |
|---|---|---|---|
| k | Number of standard deviations | No | 3 |
--- Use the k-sigma algorithm with a k value of 2
SELECT _WSTART, COUNT(*)
FROM foo
ANOMALY_WINDOW(foo.i32, "algo=ksigma,k=2")
--- Use the IQR algorithm.
SELECT _WSTART, COUNT(*)
FROM foo
ANOMALY_WINDOW(foo.i32, "algo=iqr")
--- Use Grubbs's test.
SELECT _WSTART, COUNT(*)
FROM foo
ANOMALY_WINDOW(foo.i32, "algo=grubbs")
pos), negative anomalies (neg), or both (both). The maximum proportion of data that can be anomalous (max_anoms) is at worst 49.9% Typically, the proportion of anomalies in a dataset does not exceed 5%.| Parameter | Description | Required? | Default |
|---|---|---|---|
| direction | Specify the direction of anomalies ('pos', 'neg', or 'both'). | No | "both" |
| max_anoms | Specify maximum proportion of data that can be anomalous k, where 0 < k <= 49.9 | No | 0.05 |
| period | The number of data points included in each period | No | 0 |
--- Use the SHESD algorithm in both directions with a maximum 5% of the data being anomalous
SELECT _WSTART, COUNT(*)
FROM foo
ANOMALY_WINDOW(foo.i32, "algo=shesd,direction=both,anoms=0.05")
The following algorithms are in development:
Change point detection--based algorithms: