如何检测时间序列数据中的显着变化/趋势? [英] How to detect significant change / trend in a time series data?

查看:41
本文介绍了如何检测时间序列数据中的显着变化/趋势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个 25 个样本的数组,我希望能够注意到它是从 25 个样本时间间隔减少 n 还是增加的趋势(基本上 25 个样本数组是我的缓冲区,由每个说 1 毫秒).

So I have an array of say 25 samples and I would want to be able to note the trends of whether it's decreasing n or increasing from those 25 sample time interval(basically 25 samples array is my buffer that is being filled by every say 1 ms).

请注意,我正在寻找的是总体趋势,而不是个别导数(因为我会使用有限差分或其他数值微分技术获得).

Note that it is general trend that I am looking for, not the individual derivative(as I would have obtained using finite difference or other numerical differentiation techniques).

基本上我希望我的数据是嘈杂的,所以即使在进行过滤等之后也可能会有起伏.但这是我正在寻找的行为增加或减少的总体趋势.

Basically I expect my data to be noisy so there might be ups and downs even after doing filtering and so on. But it's the general trend of increasing or decreasing behaviour that I am looking for.

我想在每毫秒内集成增加/减少行为以触发一些事件,这更像是一个用户界面事件(闪烁 LED),因此只要我能检测到一般情况,它就不必非常延迟处理趋势.

I want to integrate the increasing/decreasing behaviour in every ms to trigger some event which is more of a user interface event (blinking a LED) so it does not have to very delay of processing as long as I can detect the general trend.

提前致谢!

推荐答案

正如已经指出的那样,您不是在寻找衍生物.您确实在寻找时间序列的重大变化"检测算法.

As has been pointed out already, you're not looking for the derivative. You're really looking for a "significant change" detection algorithm for a time series.

您肯定需要一个平滑过滤器(移动平均过滤器很好——请参阅 Bjorn 的回答)部分).

You'll certainly want a smoothing filter (and the moving average filter is fine -- see Bjorn's answer for this part).

但除了平滑过滤器之外,您还需要一个决策标准或阈值选择器,超过它您将决定过滤后的变化是否显着.

But in addition to the smoothing filter, you will also need a decision criteria or threshold selector beyond which you will decide whether or not the filtered changes are significant.

如果您的时间序列的基础统计数据是稳定的(平稳时间序列),那么您可以使用固定的统计阈值,即与平均值的标准偏差.例如,如果您想要一个相当强的警报"阈值,您可以选择 2 个标准差(认为仅对最强的 5% 回报发出警报).

If the underlying statistics of your time series is stable (stationary time series), then you can use a fixed statistical threshold, in the sense of standard deviations from the mean. For example, you might choose 2 standard deviations if you want a fairly strong "alarm" threshold (think alarming only on the strongest 5% of returns).

如果根本问题中没有任何内容表明您的时间序列是稳定的,即如果序列中可能有趋势,或者生成时间序列的基础过程可以在您监视它时发生根本性的变化,那么您需要使用动态或自适应阈值,就信噪比 (mu/sigma) 而言.然后,您可以选择检测通过信噪比测试的所有有意义"元素.

If there is nothing in the underlying problem that suggests that your time series is stable, i.e. if series could have a trend in it, or the underlying process generating the time series can go through fundmantal changes while you're monitoring it, then you'll need to use a dynamic, or adaptive threshold, in the sense of signal-to-noise (mu/sigma). You might then choose to detect all "meaningful" elements that pass the signal to noise test.

这篇关于如何检测时间序列数据中的显着变化/趋势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆