robustSmoothSpline(aroma.light)
robustSmoothSpline()所属R语言包:aroma.light
Robust fit of a Smoothing Spline
的鲁棒适合的平滑样条
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a smoothing spline robustly using the L_1 norm. Currently, the algorithm is an iterative reweighted smooth spline algorithm which calls smooth.spline(x,y,w,...) at each iteration with the weights w equal to the inverse of the absolute value of the residuals for the last iteration step.
适合平滑样条,有力L_1规范。目前,该算法是一个迭代重加权光滑样条算法,这就要求smooth.spline(x,y,w,...)在每个迭代的权重w等于最后一次迭代步残差绝对值的倒数。
用法----------Usage----------
参数----------Arguments----------
参数:x
a vector giving the values of the predictor variable, or a list or a two-column matrix specifying x and y. If x is of class smooth.spline then x$x is used as the x values and x$yin are used as the y values.
vector预测变量的值,或list或两列matrix指定x和y。如果x类smooth.spline然后x$x的x值x$yin的y值。
参数:y
responses. If y is missing, the responses are assumed to be specified by x.
反应。 y如果丢失,反应被假定为指定由x。
参数:w
a vector of weights the same length as x giving the weights to use for each element of x. Default value is equal weight to all values.
vector权重相同的长度为x使用每x的元素的重量。默认值是同等重量的所有值。
参数:...
Other arguments passed to smooth.spline.
其他参数传递到smooth.spline。
参数:minIter
the minimum number of iterations used to fit the smoothing spline robustly. Default value is 3.
强劲,以适应光滑样条迭代的最小数目。默认值是3。
参数:maxIter
the maximum number of iterations used to fit the smoothing spline robustly. Default value is 25.
强劲,以适应光滑样条迭代的最大数量。默认值为25。
参数:sdCriteria
Convergence criteria, which the difference between the standard deviation of the residuals between two consecutive iteration steps. Default value is 2e-4.
趋同标准,连续两次迭代步骤之间的残差标准差之间的差异。默认值是2E-4。
参数:reps
Small positive number added to residuals to avoid division by zero when calculating new weights for next iteration.
小的正数添加到残差为下一次迭代计算新的权重时,为了避免被零除。
参数:tol
Passed to smooth.spline (R >= 2.14.0).
传递smooth.spline(R> = 2.14.0)。
参数:plotCurves
If TRUE, the fitted splines are added to the current plot, otherwise not.
如果TRUE,拟合样条添加到当前的图,否则不是。
值----------Value----------
Returns an object of class smooth.spline.
类smooth.spline返回一个对象。
作者(S)----------Author(s)----------
Henrik Bengtsson (<a href="http://www.braju.com/R/">http://www.braju.com/R/</a>)
参见----------See Also----------
smooth.spline.
smooth.spline。
举例----------Examples----------
data(cars)
attach(cars)
plot(speed, dist, main = "data(cars) & robust smoothing splines")
# Fit a smoothing spline using L_2 norm[适合平滑样条使用L_2规范]
cars.spl <- smooth.spline(speed, dist)
lines(cars.spl, col = "blue")
# Fit a smoothing spline using L_1 norm[适合平滑样条使用L_1范]
cars.rspl <- robustSmoothSpline(speed, dist)
lines(cars.rspl, col = "red")
# Fit a smoothing spline using L_2 norm with 10 degrees of freedom[适合平滑样条用10自由度L_2规范]
lines(smooth.spline(speed, dist, df=10), lty=2, col = "blue")
# Fit a smoothing spline using L_1 norm with 10 degrees of freedom[适合平滑样条用10自由度L_1范]
lines(robustSmoothSpline(speed, dist, df=10), lty=2, col = "red")
legend(5,120, c(
paste("smooth.spline [C.V.] => df =",round(cars.spl$df,1)),
paste("robustSmoothSpline [C.V.] => df =",round(cars.rspl$df,1)),
"standard with s( * , df = 10)", "robust with s( * , df = 10)"
), col = c("blue","red","blue","red"), lty = c(1,1,2,2), bg='bisque')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|