找回密码
 注册
查看: 1930|回复: 0

R语言:smooth.construct.tp.smooth.spec()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:20:48 | 显示全部楼层 |阅读模式
smooth.construct.tp.smooth.spec(mgcv)
smooth.construct.tp.smooth.spec()所属R语言包:mgcv

                                        Penalized thin plate regression splines in GAMs
                                         处罚薄板在GAMS回归样条

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

gam can use isotropic smooths of any number of variables, specified via terms like s(x,z,bs="tp",m=3) (or just s(x,z) as this is the default basis). These terms are based on thin plate  regression splines. m specifies the order of the derivatives in the thin plate spline penalty.
gam可以使用任意数量的变量,通过类似的条款规定,各向同性平滑s(x,z,bs="tp",m=3)(或只是s(x,z),因为这是默认的基础上)。这些条款是基于薄板回归样条。 m指定薄板样条刑罚的衍生物的顺序。

Thin plate regression splines are constructed by starting with the basis and penalty for a full thin plate spline and then truncating this basis in an optimal manner, to obtain a low rank smoother. Details are given in Wood (2003). One key advantage of the approach is that it avoids the knot placement problems of conventional regression spline modelling, but it also has the advantage that smooths of lower rank are nested within smooths of higher rank, so that it is legitimate to use conventional hypothesis testing methods to compare models based on pure regression splines. Note that the basis truncation does not change the  meaning of the thin plate spline penalty (it penalizes exactly what it  would have penalized for a full thin plate spline).
薄板云形回归,构建起一个完整的薄板样条的基础和罚款,然后截断在此基础上,以最佳方式获得一个低的排名更顺畅。伍德(2003)的详细情况。该方法的关键优势之一是,它避免了传统的回归样条建模结安置问题,但它也有平滑排名较低的优势,在更高级别的平滑嵌套,所以它是合法的,使用传统的假设检验方法比较纯回归样条模型。请注意,不会改变的基础截断薄板样条惩罚(惩罚到底是什么将一个完整的薄板样条的惩罚)的含义。

The t.p.r.s. basis and penalties can become expensive to calculate for large datasets. For this reason the default behaviour is to randomly subsample max.knots unique data locations if there are more than max.knots such, and to use the sub-sample for basis construction. The sampling is always done with the same random seed to ensure repeatability (does not reset R RNG). max.knots is 2000, by default. Both seed and max.knots can be modified using the xt argument to s. Alternatively the user can supply knots from which to construct a basis.
在t.p.r.s.依据和罚款可以成为昂贵的计算大型数据集。出于这个原因,默认行为是随机子样本max.knots独特的数据的位置,如果有超过max.knots等,用于基础建设的子样本。抽样总是做相同的随机种子,以确保可重复性(不复原R的RNG)。 max.knots是2000年,由默认。既种子和max.knotsxt使用s参数,可以修改。另外,用户可以提供海里,从建立一个基础。

The "ts" smooths are t.p.r.s. with the penalty modified so that the term is shrunk to zero  for high enough smoothing parameter, rather than being shrunk towards a function in the  penalty null space (see details).
"ts"的抚平都t.p.r.s.罚款修改,使长期被缩小到零(见详情)对罚款空空间的功能缩水,而不是足够高的平滑参数。


用法----------Usage----------


## S3 method for class 'tp.smooth.spec'
smooth.construct(object, data, knots)
## S3 method for class 'ts.smooth.spec'
smooth.construct(object, data, knots)



参数----------Arguments----------

参数:object
a smooth specification object, usually generated by a term s(...,bs="tp",...) or  s(...,bs="ts",...)
平稳规范的对象,通常由任期s(...,bs="tp",...)或s(...,bs="ts",...)产生


参数:data
a list containing just the data (including any by variable) required by this term,  with names corresponding to object$term (and object$by). The by variable  is the last element.  
一个列表,其中包含的数据(包括任何by变)这个词所要求的名称object$term,(object$by)。 by变量是最后一个元素。


参数:knots
a list containing any knots supplied for basis setup — in same order and with same names as data.  Can be NULL
一个列表,其中包含基础设置提供任何节 - 在同一顺序相同的名称为data。可以NULL


Details

详情----------Details----------

The default basis dimension for this class is k=M+k.def where M is the null space dimension  (dimension of unpenalized function space) and k.def is 8 for dimension 1, 27 for dimension 2 and 100 for higher dimensions.  This is essentially arbitrary, and should be checked, but as with all penalized regression smoothers, results are statistically  insensitive to the exact choise, provided it is not so small that it forces oversmoothing (the smoother's  degrees of freedom are controlled primarily by its smoothing parameter).
这个类的默认基础尺寸是k=M+k.def其中M是空的空间尺寸(的unpenalized函数空间的维数)和k.def是维度1 8 27 2维和100更高的层面。这基本上是任意,应进行检查,但作为与所有受罚回归平滑,结果是统计不敏感的准确体例选择,它是不那么小,它迫使oversmoothing(自由,流畅的程度是主要是由它的平滑参数控制)。

The default is to set m (the order of derivative in the thin plate spline penalty) to the smallest value satisfying 2m > d+1 where d if the number of covariates of the term: this yields "visually smooth" functions. In any case 2m>d must be satisfied.
默认设置m(薄板样条罚款的衍生),最小的价值,满足2m > d+1其中d如果在长期的协变量的数目:这个产量 ;视觉流畅的职能。在任何情况下2m>d必须满足。

The constructor is not normally called directly, but is rather used internally by gam.  To use for basis setup it is recommended to use smooth.construct2.  
构造函数通常不直接调用,但内部而不是使用gam。用于基础设置,建议使用smooth.construct2。

For these classes the specification object will contain information on how to handle large datasets in their xt field. The default is to randomly subsample 3000 "knots" from which to produce a tprs basis, if the number of unique predictor variable combinations in excess of 3000. The default can be modified via the xt argument to s. This is supplied as a list with elements max.knots and seed containing a number to use in place of 3000, and the random number seed to use (either can be missing).
这些类的规范object将包含如何处理大型数据集,在他们的xt场的信息。默认的是随机子样本3000“结”,从中产生TPRS基础,如果超过3000的独特预测变量组合的数量。默认情况下,可以通过xts参数进行修改。这是作为一个元素的列表提供max.knots和seed包含一个数字,在3000的地方,使用和使用的随机数种子(或者可以被失踪)。

For these bases knots has two uses. Firstly, as mentioned already, for large datasets  the calculation of the tp basis can be time-consuming. The user can retain most of the advantages of the t.p.r.s.  approach by supplying  a reduced set of covariate values from which to obtain the basis -  typically the number of covariate values used will be substantially  smaller than the number of data, and substantially larger than the basis dimension, k. This approach is  the one taken automatically if the number of unique covariate values (combinations) exceeds max.knots. The second possibility  is to avoid the eigen-decomposition used to find the t.p.r.s. basis altogether and simply use  the basis implied by the chosen knots: this will happen if the number of knots supplied matches the  basis dimension, k. For a given basis dimension the second option is  faster, but gives poorer results (and the user must be quite careful in choosing knot locations).
这些基地knots有两个用途。首先,正如已经提到的,tp的基础,可以费时的计算大型数据集。用户可以保留大部分的TPRS的优势供应减少了协值的集合,从中获取的基础方法 - 通常使用的协变量值的数量将大大小于数据的数量,并大大高于维度的基础上,k。这种方法是一个自动采取独特的协变量值(组合),如果超过max.knots。第二个可能性是为了避免找到TPRS的特征分解的基础上,完全只需使用所选择的结暗示的基础上会出现这种情况,如果提供海里的数量相匹配的基础层面,k。对于一个给定的基础维度的第二个选项是更快,但给出的结果较差(用户必须相当谨慎选择结位置)。

The shrinkage version of the smooth, eigen-decomposes the wiggliness penalty matrix, and sets its zero eigenvalues to small  multiples of the smallest strictly positive eigenvalue. The penalty is then set to the matrix with eigenvectors corresponding  to those of the original penalty, but eigenvalues set to the peturbed versions. This penalty matrix has full rank and shrinks  the curve to zero at high enough smoothing parameters.
收缩版本的顺利,本征分解的wiggliness的罚款矩阵,其零特征值,并设置严格正的最小特征值的小倍数。刑罚设置与原处罚的相应特征向量矩阵,特征值设置的peturbed版本。这个点球矩阵满秩和收缩曲线在足够高的平滑参数为零。


值----------Value----------

An object of class "tprs.smooth" or "ts.smooth". In addition to the usual elements of a  smooth class documented under smooth.construct, this object will contain:
一个对象类"tprs.smooth"或"ts.smooth"。除了平时记录下smooth.construct顺利类元素,这个对象将包含:


参数:shift
A record of the shift applied to each covariate in order to center it around zero and  avoid any co-linearity problems that might otehrwise occur in the penalty null space basis of the term.  
移位的记录应用于每个协以围绕零,避免任何可能otehrwise发生在点球空一词的空间基础的共线性问题。


参数:Xu
A matrix of the unique covariate combinations for this smooth (the basis is constructed by first stripping  out duplicate locations).
独特协组合矩阵,这个平稳(构造的基础是先剥离出重复的位置)。


参数:UZ
The matrix mapping the t.p.r.s. parameters back to the parameters of a full thin plate spline.
矩阵映射t.p.r.s.参数返回一个完整的薄板样条的参数。


参数:null.space.dimension
The dimension of the space of functions that have zero wiggliness according to the  wiggliness penalty for this term.
维空间的功能,有零wiggliness根据本学期wiggliness罚款。


作者(S)----------Author(s)----------


Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>



参考文献----------References----------



举例----------Examples----------


## see ?gam[#看到了什么?GAM]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 12:00 , Processed in 0.021857 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表