tensor.prod.model.matrix(mgcv)
tensor.prod.model.matrix()所属R语言包:mgcv
Utility functions for constructing tensor product smooths
构造张量积平滑的实用功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Produce model matrices or penalty matrices for a tensor product smooth from the model matrices or penalty matrices for the marginal bases of the smooth.
生产平稳顺利边际基地罚款从模型矩阵或矩阵张量积模型矩阵或罚款矩阵。
用法----------Usage----------
tensor.prod.model.matrix(X)
tensor.prod.penalties(S)
参数----------Arguments----------
参数:X
a list of model matrices for the marginal bases of a smooth
一个平稳的边际基地模型矩阵列表
参数:S
a list of penalties for the marginal bases of a smooth.
一个平稳边际基地的处罚名单。
Details
详情----------Details----------
If X[[1]], X[[2]] ... X[[m]] are the model matrices of the marginal bases of a tensor product smooth then the ith row of the model matrix for the whole tensor product smooth is given by X[[1]][i,]%x%X[[2]][i,]%x% ... X[[m]][i,], where %x% is the Kronecker product. Of course the routine operates column-wise, not row-wise!
如果X[[1]],X[[2]]... X[[m]]张量的产品顺利的边际基地模型矩阵模型矩阵第i行全张量积顺利X[[1]][i,]%x%X[[2]][i,]%x% ... X[[m]][i,],其中%x%是克罗内克产品。当然,日常工作列明智的,不是明智的行!
If S[[1]], S[[2]] ... S[[m]] are the penalty matrices for the marginal bases, and I[[1]], I[[2]] ... I[[m]] are corresponding identity matrices, each of the same dimension as its corresponding penalty, then the tensor product smooth has m associate penalties of the form:
如果S[[1]],S[[2]]... S[[m]]是边际基地的罚款矩阵,I[[1]],I[[2]]... I[[m]]有相应的标识矩阵,其相应的处罚相同尺寸,然后顺利的张量积形式的M副处罚:
S[[1]]%x%I[[2]]%x% ... I[[m]],
S[[1]]%x%I[[2]]%x% ... I[[m]]
I[[1]]%x%S[[2]]%x% ... I[[m]]
I[[1]]%x%S[[2]]%x% ... I[[m]]
...
...
I[[1]]%x%I[[2]]%x% ... S[[m]].
I[[1]]%x%I[[2]]%x% ... S[[m]]。
Of course it's important that the model matrices and penalty matrices are presented in the same order when constructing tensor product smooths.
当然重要的是该模型矩阵和罚款矩阵在相同的顺序,当构造张量积平滑。
值----------Value----------
Either a single model matrix for a tensor product smooth, or a list of penalty terms for a tensor product smooth.
无论是单一模型矩阵张量积光滑,或张量的产品顺利的处罚条款列表。
作者(S)----------Author(s)----------
Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>
参考文献----------References----------
Generalized Additive Mixed Models. Biometrics 62(4):1025-1036
参见----------See Also----------
te, smooth.construct.tensor.smooth.spec
te,smooth.construct.tensor.smooth.spec
举例----------Examples----------
X <- list(matrix(1:4,2,2),matrix(5:10,2,3))
tensor.prod.model.matrix(X)
S<-list(matrix(c(2,1,1,2),2,2),matrix(c(2,1,0,1,2,1,0,1,2),3,3))
tensor.prod.penalties(S)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|