gam.control(mgcv)
gam.control()所属R语言包:mgcv
Setting GAM fitting defaults
自由亚齐运动拟合默认设置
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This is an internal function of package mgcv which allows control of the numerical options for fitting a GAM. Typically users will want to modify the defaults if model fitting fails to converge, or if the warnings are generated which suggest a loss of numerical stability during fitting. To change the default choise of fitting method, see gam arguments method and optimizer.
这是一个内部功能包mgcv允许自由亚齐运动拟合控制数值选项。通常情况下,用户将要修改的默认值,如果模型拟合没有收敛,或如果产生警告,这表明在装修损失的数值稳定性。要更改默认的体例选择的拟合方法,请参阅gam参数method和optimizer。
用法----------Usage----------
gam.control(irls.reg=0.0,epsilon = 1e-06, maxit = 100,
mgcv.tol=1e-7,mgcv.half=15, trace = FALSE,
rank.tol=.Machine$double.eps^0.5,
nlm=list(),optim=list(),newton=list(),
outerPIsteps=0,idLinksBases=TRUE,scalePenalty=TRUE,
keepData=FALSE)
参数----------Arguments----------
参数:irls.reg
For most models this should be 0. The iteratively re-weighted least squares method by which GAMs are fitted can fail to converge in some circumstances. For example, data with many zeroes can cause problems in a model with a log link, because a mean of zero corresponds to an infinite range of linear predictor values. Such convergence problems are caused by a fundamental lack of identifiability, but do not show up as lack of identifiability in the penalized linear model problems that have to be solved at each stage of iteration. In such circumstances it is possible to apply a ridge regression penalty to the model to impose identifiability, and irls.reg is the size of the penalty.
对于大多数车型,这应该是0。迭代重加权最小二乘法通过GAMS配备,在某些情况下可能无法收敛。例如,有许多零的数据可能会导致日志链接模型中的问题,因为一个零均值对应到无限的线性预测值范围。这样的衔接问题所造成的缺乏基本的辨识,但不作为处罚的线性模型的问题,必须在每个阶段的迭代求解辨识缺乏。在这种情况下,它是可能的应用岭回归刑罚的模式强加辨识,和irls.reg是刑罚的大小。
参数:epsilon
This is used for judging conversion of the GLM IRLS loop in gam.fit or gam.fit3.
这是使用的GLM IRLS循环判断gam.fit或gam.fit3的转换。
参数:maxit
Maximum number of IRLS iterations to perform.
IRLS迭代执行的最大数量。
参数:mgcv.tol
The convergence tolerance parameter to use in GCV/UBRE optimization.
在GCV / UBRE优化使用收敛性参数。
参数:mgcv.half
If a step of the GCV/UBRE optimization method leads to a worse GCV/UBRE score, then the step length is halved. This is the number of halvings to try before giving up.
如果GCV / UBRE优化方法步骤导致更糟的GCV的/ UBRE得分,然后步长减半。这是数halvings放弃前尝试。
参数:trace
Set this to TRUE to turn on diagnostic output.
设置TRUE打开诊断输出。
参数:rank.tol
The tolerance used to estimate the rank of the fitting problem, for methods which deal with rank deficient cases (basically all except those based on mgcv).
公差与排名缺乏的情况下,处理的方法,用于估计排名装修问题(基本上所有除了mgcv基于)。
参数:nlm
list of control parameters to pass to nlm if this is used for outer estimation of smoothing parameters (not default). See details.
控制参数列表传递给nlm如果这是外部的平滑参数估计(不默认)使用。查看详情。
参数:optim
list of control parameters to pass to optim if this is used for outer estimation of smoothing parameters (not default). See details.
控制参数列表传递给optim如果这是外部的平滑参数估计(不默认)使用。查看详情。
参数:newton
list of control parameters to pass to default Newton optimizer used for outer estimation of log smoothing parameters. See details.
控制参数列表传递给默认的牛顿优化用于外日志平滑参数估计。查看详情。
参数:outerPIsteps
The number of performance interation steps used to initialize outer iteration.
性能互为作用的步骤,用来初始化外部循环。
参数:idLinksBases
If smooth terms have their smoothing parameters linked via the id mechanism (see s), should they also have the same bases. Set this to FALSE only if you are sure you know what you are doing (you should almost surely set scalePenalty to FALSE as well in this case).
如果顺利的方面有其平滑参数通过id机制(见s),他们应该也有相同的基地相连。设置为FALSE只有当你确定你知道你在做什么(你应该几乎肯定设置的scalePenaltyFALSE以及在这种情况下)。
参数:scalePenalty
gamm is somewhat sensitive to the absolute scaling of the penalty matrices of a smooth relative to its model matrix. This option rescales the penalty matrices to accomodate this problem. Probably should be set to FALSE if you are linking smoothing parameters but have set idLinkBases to FALSE.
gamm是有点敏感的平稳相对其模型矩阵的罚款矩阵的绝对尺度。此选项重新调整了罚款矩阵,以适应这个问题。可能应设置为如果你是连接平滑参数,但FALSE设置idLinkBasesFALSE。
参数:keepData
Should a copy of the original data argument be kept in the gam object? Strict compatibility with class glm would keep it, but it wastes space to do so.
应原data参数的副本被保存在gam对象?严格的兼容性类glm将保留它,但它这样做浪费空间。
Details
详情----------Details----------
Outer iteration using newton is controlled by the list newton with the following elements: conv.tol (default 1e-6) is the relative convergence tolerance; maxNstep is the maximum length allowed for an element of the Newton search direction (default 5); maxSstep is the maximum length allowed for an element of the steepest descent direction (only used if Newton fails - default 2); maxHalf is the maximum number of step halvings to permit before giving up (default 30).
外部循环使用newton控制列表newton以下要素:conv.tol(默认是1e-6)是相对收敛公差; maxNstep是允许的最大长度牛顿搜索方向(默认为5)的一个元素;maxSstep是最速下降方向(仅用于如果牛顿失败 - 默认为2)的元素所允许的最大长度; maxHalf是最大的一步halvings允许放弃之前(默认为30)。
If outer iteration using nlm is used for fitting, then the control list nlm stores control arguments for calls to routine nlm. The list has the following named elements: (i) ndigit is the number of significant digits in the GCV/UBRE score - by default this is worked out from epsilon; (ii) gradtol is the tolerance used to judge convergence of the gradient of the GCV/UBRE score to zero - by default set to 10*epsilon; (iii) stepmax is the maximum allowable log smoothing parameter step - defaults to 2; (iv) steptol is the minimum allowable step length - defaults to 1e-4; (v) iterlim is the maximum number of optimization steps allowed - defaults to 200; (vi) check.analyticals indicates whether the built in exact derivative calculations should be checked numerically - defaults to FALSE. Any of these which are not supplied and named in the list are set to their default values.
如果外部循环使用nlm用于装修,然后控制列表nlm例行nlm调用存储控制参数。列表中有以下内容:(一)ndigit是在GCV / UBRE得分的有效位数的号码 - 默认情况下,这是从epsilon工作;(二)gradtol的用来判断GCV / UBRE得分零梯度收敛公差 - 默认设置为10*epsilon;(三)stepmax的是允许的最大日志平滑参数的一步 - 默认为2; (四)steptol是允许的最小步长 - 默认1E-4;(V)iterlim是允许的优化步骤的最大数量 - 默认为200;(六)check.analyticals表示是否建立了精确的导数计算应检查数值 - 默认为FALSE。其中任何不提供列表中的命名设置为其默认值。
Outer iteration using optim is controlled using list optim, which currently has one element: factr which takes default value 1e7.
外部循环使用optim使用列表控制optim,目前有一个元素:factr这需要默认值1E7。
作者(S)----------Author(s)----------
Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>
参考文献----------References----------
and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society (B) 73(1):3-36
generalized additive models. J. Amer. Statist. Ass.99:673-686.
参见----------See Also----------
gam, gam.fit, glm.control
gam,gam.fit,glm.control
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|