且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通用时间序列在线异常值检测的简单算法

更新时间:2023-02-26 19:50:29

这是一个大而复杂的主题,答案将取决于 (a) 你想在这方面投入多少努力以及 (b) 你的效率如何希望您的异常值检测成为.一种可能的方法是自适应过滤,它通常用于降噪耳机等应用.您具有不断适应输入信号的滤波器,有效地将其滤波器系数与信号源的假设短期模型相匹配,从而减少均方误差输出.这会给你一个低电平的输出信号(残差)除了,当你得到一个异常值时,这将导致一个尖峰,这很容易检测到(阈值).阅读 自适应过滤, LMS 过滤器等,如果你对这种技术很认真的话.

This is a big and complex subject, and the answer will depend on (a) how much effort you want to invest in this and (b) how effective you want your outlier detection to be. One possible approach is adaptive filtering, which is typically used for applications like noise cancelling headphones, etc. You have a filter which constantly adapts to the input signal, effectively matching its filter coefficients to a hypothetical short term model of the signal source, thereby reducing mean square error output. This then gives you a low level output signal (the residual error) except for when you get an outlier, which will result in a spike, which will be easy to detect (threshold). Read up on adaptive filtering, LMS filters, etc, if you're serious about this kind of technique.