简体   繁体   English

Kusto series_outliers() 如何计算异常分数?

[英]How does Kusto series_outliers() calculate anomaly scores?

Can someone please explain how the series_outliers() Kusto function calculates the anomaly scores?有人可以解释 series_outliers() Kusto function 如何计算异常分数吗? I understand that it uses Tukey fences with a min percentile and max percentile given a numeric array, but I would like to know in more details what are the steps/algorithm.我知道它使用带有最小百分位数和最大百分位数的 Tukey 栅栏给定一个数字数组,但我想更详细地了解步骤/算法是什么。

For example, given this table例如,给定这张表

let T = datatable(val:real)
[
   -3, 2.4, 15, 3.9, 5, 6, 4.5, 5.2, 3, 4, 5, 16, 7, 5, 5, 4
]

I found Q1 = 2.4, Q3 = 15, and IQR = 12.6 with a 10%/90% quantile range.我发现 Q1 = 2.4、Q3 = 15 和 IQR = 12.6,分位数范围为 10%/90%。 So how did it derive these anomaly scores?那么它是如何得出这些异常分数的呢? [-1.9040785483608571, -0.10021466044004519, 1.3361954725339347, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.6702443406674186, 0.0, 0.0, 0.0, 0.0] [-1.9040785483608571,-0.100214666044004519,1.3361954725339347,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.6702443406674186,0.0,0.0]

In that function the 10th and 90th are calculated with linear interpolation , so p10=2.7, p90=11 so IQR=8.3.其中 function 第 10 和第 90 是用线性插值计算的,所以 p10=2.7,p90=11 所以 IQR=8.3。
In addition, we normalize the score to get a score that is similar to standard Tukey's test (that uses 25th and 75th percentiles), regardless of the specific percentiles we used for calculating the IQR.此外,我们将分数归一化以获得类似于标准 Tukey 测试(使用第 25 和第 75 个百分位数)的分数,而不管我们用于计算 IQR 的特定百分位数。
The normalization is done by assuming normal distribution and looking at score k=1.5 (that is the common threshold for mild anomalies) when using p25 and p75.当使用 p25 和 p75 时,通过假设正态分布并查看分数 k=1.5(这是轻度异常的常见阈值)来完成归一化。 So, when using p10, p90 to normalize the score we need to multiply it by 2.772 to make sure that we get k=1.5.因此,当使用 p10、p90 对分数进行归一化时,我们需要将其乘以 2.772 以确保我们得到 k=1.5。
Let's see how it works for -3.0, the first point in your sample data.让我们看看它如何适用于 -3.0,即样本数据中的第一个点。 k=(-3-2.7)/(11-2.7)*2.772=-1.904. k=(-3-2.7)/(11-2.7)*2.772=-1.904。
I hope it's clear now.我希望现在一切都清楚了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM