功能: 通过中值寻找异常点

格式: 
IsoutlierByMedian(x)
IsoutlierByMedian(x, w)
IsoutlierByMedian(x, w, a)

x : 待检测异常数据的矩阵变量
w : 数值,滑动窗宽,如果为0时,进行全局检测,此参数默认为0
a : 异常值判断乘系数,此参数默认为4.4478 (3 * 1.4826)

说明:
1. 本函数使用如下方式判断异常值
$$
\begin{cases}
y = &\mathbf{IsoutlierByMedian}(x)
\\
\\
u &= \mathbf{DataMedian}(x);
\\
\phi &=\mathbf{DataMedian}(|x-u|);
\\
y_i &=\begin{cases}
0&,|x_i-u| < a\phi
\\
1&,|x_i-u| \geq a\phi
\end{cases}
\end{cases}
$$

2. 执行成功返回与x同维度矩阵,对应元素值为1表示判断为异常点,为0表示非异常点

3. 本函数适合偏态、重尾数据, 本函数不受到极端异常值影响, 优先使用本函数检测异常值.

4. 如果序列较长且有趋势,建议设置滑窗.

例子:
x = [1,2,1.6,3,100,1.5,2.6];
y = IsoutlierByMedian(x)//执行得到如下结果,第5个异常值被找出
y =
[ 0.00000000000000    0.00000000000000    0.00000000000000    0.00000000000000    1.00000000000000    0.00000000000000    0.00000000000000 ]