gam.convergence(mgcv)
gam.convergence()所属R语言包:mgcv
GAM convergence and performance issues
自由亚齐运动的收敛性和性能问题
译者:生物统计家园网 机器人LoveR
描述----------Description----------
When fitting GAMs there is a tradeoff between speed of fitting and probability of fit convergence. The default fitting options, specified by gam arguments method and optimizer, opt for certainty of convergence over speed of fit. In the Generalized Additive Model case it means using "outer" iteration in preference to "performance iteration": see gam.outer for details.
当拟合GAMS有一个合适的收敛速度拟合和概率之间的权衡。默认的接头选项,gam参数method和optimizer确定性收敛,选择了合适的速度指定。在广义相加模型的情况下,这意味着使用偏好的表现迭代“”外“的迭代:gam.outer详情。
It is possible for the default "outer" iteration to fail when finding intial smoothing parameters using a few steps of performance iteration (if you get a convergence failure message from magic when outer iterating, then this is what has happened): lower outerPIsteps in gam.control to fix this.
这是默认“外”迭代可能失败时,发现使用性能迭代几步intial平滑参数(如果你收敛失败的消息,从magic外迭代时,那么这是发生了什么事) :低outerPIstepsgam.control解决这个问题。
There are three things that you can try to speed up GAM fitting. (i) if you have large numbers of smoothing parameters in the generalized case, then try the "bfgs" method option in gam argument optimizer: this can be faster than the default. (ii) Change the optimizer argument to gam so that "performance iteration" is used in place of the default outer iteration. Usually performance iteration converges well and it can sometimes be quicker than the default outer iteration. (iii) For large datasets it may be worth changing the smoothing basis to use bs="cr" (see s for details) for 1-d smooths, and to use te smooths in place of s smooths for smooths of more than one variable. This is because the default thin plate regression spline basis "tp" is costly to set up for large datasets (much over 1000 data, say).
有三样东西,你可以尝试加快自由亚齐运动配件。 (i)如果你有大量的平滑参数的广义情况,然后尝试在"bfgs"说法gam方法选项optimizer:这可能是比默认更快。 (二)变更optimizer参数gam,这样的表现迭代“使用默认的外部循环。通常性能迭代收敛,它有时可能会比默认的外部循环快。 (三)对于大型数据集,它可能是值得改变平滑的基础上,使用bs="cr"(见s详情)1-D平滑,使用te的地方平滑s平滑平滑多个变量。这是因为默认的薄板回归样条基"tp"是昂贵的,为大型数据集(远超过1000个数据,说)。
If the GAM estimation process fails to converge when using performance iteration, then switch to outer iteration via the optimizer argument of gam. If it still fails, try increasing the number of IRLS iterations (see gam.control) or perhaps experiment with the convergence tolerance.
如果GAM估计过程失败时使用性能迭代收敛,然后切换到外部循环通过optimizergam参数。如果它仍然失败,请尝试增加IRLS迭代的数量(见gam.control)或者与收敛公差实验。
If you still have problems, it's worth noting that a GAM is just a (penalized) GLM and the IRLS scheme used to estimate GLMs is not guaranteed to converge. Hence non convergence of a GAM may relate to a lack of stability in the basic IRLS scheme. Therefore it is worth trying to establish whether the IRLS iterations are capable of converging. To do this fit the problematic GAM with all smooth terms specified with fx=TRUE so that the smoothing parameters are all fixed at zero. If this "largest" model can converge then, then the maintainer would quite like to know about your problem! If it doesn't converge, then its likely that your model is just too flexible for the IRLS process itself. Having tried increasing maxit in gam.control, there are several other possibilities for stabilizing the iteration. It is possible to try (i) setting lower bounds on the smoothing parameters using the min.sp argument of gam: this may or may not change the model being fitted; (ii) reducing the flexibility of the model by reducing the basis dimensions k in the specification of s and te model terms: this obviously changes the model being fitted somewhat; (iii) introduce a small regularization term into the fitting via the irls.reg argument of gam.control: this option obviously changes the nature of the fit somewhat, since parameter estimates are pulled towards zero by doing this.
如果仍然有问题,值得注意的是,自由亚齐运动(处罚)的GLM和IRLS计划,用于估计GLMs不能保证收敛。因此,自由亚齐运动的非收敛可能涉及到一个稳定在缺乏基本IRLS计划。因此,它是值得一试,以确定是否IRLS迭代收敛能力。要做到这适合顺利以fx=TRUE指定的所有条款的问题的GAM使平滑参数都固定在零。如果这个最大模式可以再收敛,然后维护者会很喜欢了解你的问题!如果不收敛,那么它很可能,你的模型实在是太为IRLS过程本身灵活。在试图增加maxit:在gam.control,有几个其他的可能性是稳定的迭代。这是可能的尝试(一)设置使用min.sp参数平滑参数的下限gam:这可能会或可能不会改变模型的正装;(ii)减少了该模型的灵活性减少的基础上尺寸k规范s和te模型方面:这显然改变有些正装的模型;(三)通过引入配件小正规化任期irls.reg参数gam.control:这个选项显然合适的性质有所改变,因为这样拉向零的参数估计。
Usually, a major contributer to fitting difficulties is that the model is a very poor description of the data.
通常情况下,拟合困难的主要贡献者是,该模型是一个很差的数据说明。
作者(S)----------Author(s)----------
Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|