hcv(sm)
hcv()所属R语言包:sm
Cross-validatory choice of smoothing parameter
跨validatory平滑参数的选择
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function uses the technique of cross-validation to select a smoothing parameter suitable for constructing a density estimate or nonparametric regression curve in one or two dimensions.
此功能使用的技术的交叉验证,选择一个适合在一维或二维构造的密度估计和非参数回归曲线的平滑参数。
用法----------Usage----------
hcv(x, y = NA, hstart = NA, hend = NA, ...)
参数----------Arguments----------
参数:x
a vector, or two-column matrix of data. If y is missing these are observations to be used in the construction of a density estimate. If y is present, these are the covariate values for a nonparametric regression.
数据的向量,或两列的矩阵。如果y缺少的观察中要使用的建筑密度估计的。 y如果存在,这是一个非参数回归的协变量值。
参数:y
a vector of response values for nonparametric regression.
非参数回归响应值的向量。
参数:hstart
the smallest value of the grid points to be used in an initial grid search for the value of the smoothing parameter.
的值最小的网格点中要使用的值的平滑化参数的初始网格搜索。
参数:hend
the largest value of the grid points to be used in an initial grid search for the value of the smoothing parameter.
最大的值的网格点中要使用的值的平滑化参数的初始网格搜索。
参数:...
other optional parameters are passed to the sm.options function, through a mechanism which limits their effect only to this call of the function. Those specifically relevant for this function are the following: h.weights, ngrid, display, add; see the documentation of sm.options for their description. </table>
其他可选的参数传递给sm.options功能,通过一种机制,限制了它们的作用仅此呼叫的功能。专门适用于该功能有以下几种:h.weights,ngrid,display,add;看到的文档sm.options其描述。 </ TABLE>
Details
详细信息----------Details----------
See Sections 2.4 and 4.5 of the reference below.
下面请参阅第2.4和4.5的参考。
The two-dimensional case uses a smoothing parameter derived from a single value, scaled by the standard deviation of each component.
的两维的情况下,使用来自一个单一的值,缩放的各成分的标准偏差的平滑参数。
This function does not employ a sophisticated algorithm and some adjustment of the search parameters may be required for different sets of data. An initial estimate of the value of h which minimises the cross-validatory criterion is located from a grid search using values which are equally spaced on a log scale between hstart and hend. A quadratic approximation is then used to refine this initial estimate.
此功能不使用复杂的算法和一些搜索参数的调整可能需要不同的数据集。初步估计的h值,这减少了交叉validatory的标准使用对数标度之间hstart和hend值等距的网格搜索距离。的二次近似,然后用完善这一初步估计。
值----------Value----------
the value of the smoothing parameter which minimises the cross-validation criterion over the selected grid.
最大限度地减少在所选择的网格的交叉验证准则的平滑参数的值。
副作用----------Side Effects----------
If the minimising value is located at the end of the grid of search positions, or if some values of the cross-validatory criterion cannot be evaluated, then a warning message is printed. In these circumstances altering the values of hstart and hend may improve performance.
如果最小化的值是位于网格的搜索位置的结束,或者如果不能评价一些跨validatory判据的值,则一个警告信息被打印。在这种情况下,改变的值hstart和hend可能会提高性能。
注意----------Note----------
As from version 2.1 of the package, a similar effect can be obtained with the new function h.select, via h.select(x, method="cv"). Users are encouraged to adopt this route, since hcv might be not accessible directly in future releases of the package. When the sample size is large hcv uses the raw data while h.select(x, method="cv") uses binning. The latter is likely to produce a more stable choice for h.
从2.1版本的包,类似的效果,可以得到新的功能h.select,通过h.select(x, method="cv")。我们鼓励用户采用这条路线,因为hcv可能无法直接存取在未来版本的软件包。当样本数大hcv使用原始数据,而h.select(x, method="cv")采用分级。而后者很可能产生一个更稳定的选择h。
参考文献----------References----------
Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.
参见----------See Also----------
h.select, hsj, hnorm
h.select,hsj,hnorm
实例----------Examples----------
# Density estimation[密度估计]
x <- rnorm(50)
par(mfrow=c(1,2))
h.cv <- hcv(x, display="lines", ngrid=32)
sm.density(x, h=hcv(x))
par(mfrow=c(1,1))
# Nonparametric regression[非参数回归]
x <- seq(0, 1, length = 50)
y <- rnorm(50, sin(2 * pi * x), 0.2)
par(mfrow=c(1,2))
h.cv <- hcv(x, y, display="lines", ngrid=32)
sm.regression(x, y, h=hcv(x, y))
par(mfrow=c(1,1))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|