数据是否存在线性趋势? [英] Is there a linear trend in data?

查看:91
本文介绍了数据是否存在线性趋势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个连续输入的数据,该数据由整数x = [x1,...,xn], n<1 000 000的数组表示.每两个元素满足以下条件x[i] < x[i + 1].

I am having a continuously incoming data represented by an array of integer x = [x1,...,xn], n<1 000 000. Each two elements satisfy the following condition x[i] < x[i + 1].

我需要尽可能快地检测到这样的断点,这些数据的线性趋势在此终止并转换为二次趋势.数据始终以线性趋势开头...

I need to detected as fast as possible such a breakpoint, where the linear trend of these data ends and transforms into a quadratic trend. The data always starts with linear trend...

我试图计算

k = (x[i+1] - x[i])/ (x[i] - x[i-1]) 

但是此测试不太可靠...也许有一个更简单有效的统计测试...在这种情况下,回归线的计算速度很慢...

But this test not too reliable... Maybe there is a more simple and efficent statistic test... The computation of the regression line is slow in this case...

推荐答案

实际上,您是在计算函数的导数.可能您应该使用更多点来进行计算,例如5,请参见五点模具

Actually you calculate a derivative of the function. Possibly you should use more points for calculating it e.g. 5, see Five-point stencil

这篇关于数据是否存在线性趋势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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