平滑小的数据集二阶二次曲线 [英] Smoothing Small Data Set With Second Order Quadratic Curve

查看:241
本文介绍了平滑小的数据集二阶二次曲线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一些具体的信号分析,我需要将理顺一个给定的钟形分布曲线的方法。移动平均值的做法是不生产我想要的结果。我想保持我的拟合曲线的最小/最大,和一般的形状不变,但在取样化解矛盾。

I'm doing some specific signal analysis, and I am in need of a method that would smooth out a given bell-shaped distribution curve. A running average approach isn't producing the results I desire. I want to keep the min/max, and general shape of my fitted curve intact, but resolve the inconsistencies in sampling.

在短期:如果给一组数据模型的一个简单的二次曲线,你会推荐什么样的统计平滑法

In short: if given a set of data that models a simple quadratic curve, what statistical smoothing method would you recommend?

如果可能的话,请参考实现,库或框架。

If possible, please reference an implementation, library, or framework.

太感谢!

修改:一些有用的数据。

(A可能的信号图)

在深色二次是有色连接数据点的光我的拟合曲线。

The dark colored quadratic is my "fitted" curve of the light colored connected data points.

样品@ -44(约),是在我的曲线图中的问题(即,潜在的样本不一致)。我需要这个曲线适合的分布较好,并克服不相应趋势值。希望这有助于!

The sample @ -44 (approx.), is a problem in my graph (i.e. a potential sample inconsistency). I need this curve to "fit" the distribution better, and overcome the values that do not trend accordingly. Hope this helps!

推荐答案

一个二次的曲线是一回事; 钟形通常是指一个高斯正态分布。获得一个最佳估计高斯也非常简单:你计算样本均值和方差和你的光滑近似

A "quadratic" curve is one thing; "bell-shaped" usually means a Gaussian normal distribution. Getting a best-estimate Gaussian couldn't be easier: you compute the sample mean and variance and your smooth approximation is

y = exp(-squared(x-mean)/variance)

如果,在另一方面,要近似与quadradatic平滑曲线,我建议计算最小平方误差的二次多项式。我记得nenver这个公式,但如果你有微积分,写公式总方差(逐点)和关于二次您的系数区分。一阶导数设置为零并求解最佳逼近。或者,你可以看看它。

If, on the other hand, you want to approximate a smooth curve with a quadradatic, I'd recommend computing a quadratic polynomial with minimum square error. I can nenver remember the formulas for this, but if you've had differential calculus, write the formula for the total square error (pointwise) and differentiate with respect to the coefficients of your quadratic. Set the first derivatives to zero and solve for the best approximation. Or you could look it up.

最后,如果你只是想平滑的外观曲线逼近一组点,三次样条是你最好的选择。曲线并不一定意味着什么,但你会得到一个漂亮的光滑逼近。

Finally, if you just want a smooth-looking curve to approximate a set of points, cubic splines are your best bet. The curves won't necessarily mean anything, but you'll get a nice smooth approximation.

这篇关于平滑小的数据集二阶二次曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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