添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Skip to main content

Time Series Functions

Below functions are used for series data analysis.

seriesOutliersDetectTukey

Detects outliers in series data using Tukey Fences .

Syntax

seriesOutliersDetectTukey(series);
seriesOutliersDetectTukey(series, min_percentile, max_percentile, K);

Arguments

  • series - An array of numeric values.
  • min_percentile - The minimum percentile to be used to calculate inter-quantile range (IQR) . The value must be in range [0.02,0.98] . The default is 0.25.
  • max_percentile - The maximum percentile to be used to calculate inter-quantile range (IQR). The value must be in range [0.02,0.98] . The default is 0.75.
  • K - Non-negative constant value to detect mild or stronger outliers. The default value is 1.5.

At least four data points are required in series to detect outliers.

Returned value

  • Returns an array of the same length as the input array where each value represents score of possible anomaly of corresponding element in the series. A non-zero score indicates a possible anomaly. Array .

Examples

Query:

SELECT seriesOutliersDetectTukey([-3, 2, 15, 3, 5, 6, 4, 5, 12, 45, 12, 3, 3, 4, 5, 6]) AS print_0;

Result:

┌───────────print_0─────────────────┐
│[0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0] │
└───────────────────────────────────┘

Query:

SELECT seriesOutliersDetectTukey([-3, 2, 15, 3, 5, 6, 4.50, 5, 12, 45, 12, 3.40, 3, 4, 5, 6], 0.2, 0.8, 1.5) AS print_0;

Result:

┌─print_0──────────────────────────────┐
│ [0,0,0,0,0,0,0,0,0,19.5,0,0,0,0,0,0] │
└──────────────────────────────────────┘

seriesPeriodDetectFFT

Finds the period of the given series data data using FFT