【源码】loess method扩展算法仿真

在这里插入图片描述

我在这里的贡献是提供一个扩展版的loess方法,它允许在观测数据范围内的任何位置进行估计,也可以估计这些位置的局部坡度。

My contribution here is to provide an extended version of the loess method that allows for estimates at any location within the range of the observed data, and also for estimates of the local slope at those locations.

该算法还可以解释观测数据中的空白。

The algorithm also accounts for gaps in the observed data.

loess法最早是由威廉·克利夫兰于1979年至1996年提出的(详见维基百科网页)。

The loess method was first introduced by William Cleveland between 1979 and 1996 (see Wikipedia page for details).

该方法是Matlab平滑函数中包含的几种方法之一。

The method is one of several methods included in the Matlab’s smooth function.

该方法可用于n维估计,但这里的重点是一维问题。

The method can be used for n-dimensional estimation, but the focus here, and also with the smooth function, is on 1D problems.

考虑一组观测数值,yi和xi,i=1到n。

Consider a set of observations, yi and xi, where i = 1 to n.

假设yi的观测值等于Yi + ei,其中矢量Yi代表“真”值,矢量ei表示随机独立误差。

The observations of yi are assumed be equal to Yi + ei, where the vector Yi represents “true” values, and the vector ei represents random independent errors.

loess法通过“移动”最小二乘法估计函数Y(x)。

The loess method estimates the function Y(x) by using a “moving” least-squares fit.

移动拟合应用于指定的x位置,并由二阶多项式拟合函数和三次加权函数表示,这两个函数在每次估计中都以x位置为中心。

The moving fit is applied at specified x locations, and is represented by a 2nd order polynomial fitting function, and tricubic weighting function, both of which are centered on the x location for each estimate.

因此,loess法可以看作是一个移动的泰勒级数近似。

As such, the loess method can be viewed as a moving Taylor-series approximation.

loess法的一个优点是,由于它是基于最小二乘法的,因此该方法的所有知识都可以直接用于理解和解释loess估计。

A nice aspect of the loess method is that, since it is based on the least squares method, all of the knowledge for that method is directly applicable for understanding and interpreting the loess estimates.

本文对loess函数进行了推广,以便于更多的应用。

The loess function provided here is generalized to allow for more applications.

通常loess方法只提供在观测位置xi的观测值。

Usually the loess method only provides estimates at the locations xi for the observations.

这里的函数允许在观测范围内的任何指定位置xq进行估计。

The function here allows for estimates at any specified location, xq, within the range of the observations.

输出包括指定xq位置的Yq和dYq/dx的估计值。

The output includes estimates of Yq and dYq/dx at the specified xq locations.

此外,该代码还解释了观测中不能直接估计Yq和dYq/dx的空白数值。

In addition, the code also accounts for gaps in the observations where Yq and dYq/dx cannot be directly estimated.

注意,多项式最小二乘法很容易出现数值不稳定性,因为其中涉及到x的幂次变换。

Note that polynomial least-squares is prone to numerical instabilities, given that the transformation that there are powers of x involved.

该函数中的最小二乘拟合是使用QR分解来完成的,它应确保所有问题的计算稳定。

The least-squares fit in this function is done using the QR decomposition, which should ensure a stable calculation for all problems.

Mark Brandon, Yale University, August 2, 2020

更多精彩文章请关注公众号:在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值