算法使一个数据组的一部分的多项式拟合 [英] Algorithm to make a polynomial fit of a part of a data set

查看:119
本文介绍了算法使一个数据组的一部分的多项式拟合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

予有算法的一个问题。我不知道,如果计算器是正确的地方张贴,但由于我使用MATLAB和想用它做这个,我将它张贴在那里。 我的问题是这样的:我有一组数据,我不很了解,除了一个事实,即在这集的末尾,该点具有相当线性的。我想提出这些问题的线性分布,而无需使用的一部分,这是不是一个线性拟合。

(图像始终是更好地理解):

正如你看到的,我有蓝色的数据,不是线性的,而是有末(红色部分)的线性部分。我想什么,是要找到一个算法,让我知道什么时候数据曲线的行为结束其线性度。

我不知道我是不是清楚了吗?

我已经采取了几个点的权利,让那几个点的线性拟合尝试。然后一些点添加到数和检查,如果这些都是线性拟合的足够接近。然后进行一次线性拟合与加了分等等,但我认为这不是最好的解决办法,因为第一点具有很大的噪音(不重复$ P $这里psented图片)...

你有什么想法或命题或链接?

感谢您!

解决方案
  

我会想什么,是要找到一个算法,让我知道什么时候数据曲线的行为结束其线性度。

线性的数据有一个特别漂亮的酒店,它具有恒定的斜率。线性部分的第二导数应大约为零。

使用的样条曲线拟合(具有某种平滑如果数据是嘈杂的),让您的数据的连续版本,称​​之为 G(x)。当 G''(X)〜0 ,即当二阶导数小,这是一个线性部分。

I have a problem of algorithm. I don't know if stackoverflow is the right place to post it but since I use matlab and want to do this with it, I post it there. My problem is the following : I have a set of data and I do not know much about it except the fact that at the end of this set, the points have to be quite linear. I want to make a linear fit of these points that are linearly distributed without using the part that is not.

(an image is always better to understand) :

As you see there, I have the blue data, that is not linear but that has a linear part at the end (red part). What I would want, is to find an algorithm that allows me to know when the behaviour of the data curve ends its linearity.

I don't know if I'm clear ?

I've tried by taking a few points at the right and make a linear fit of those few points. Then add some points to the few and check if those are "near enough" of the linear fit. Then make once more a linear fit with the added points and so on but I think it's not the best solution because the "first" points have lot of noise (which is not represented here on the image)...

Do you have any idea or proposition or link ?

Thank you !

解决方案

What I would want, is to find an algorithm that allows me to know when the behaviour of the data curve ends its linearity.

Linear data has a particularly nice property, it has constant slope. The second derivative of a linear section should be approximately zero.

Use a spline fit (with some kind of smoothing if the data is noisy) to get a continuous version of your data, call it g(x). When g''(x) ~ 0, i.e. when the second derivative is small, this is a linear section.

这篇关于算法使一个数据组的一部分的多项式拟合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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