prune(treethresh)
prune()所属R语言包:treethresh
Prune a tree using cross-validation
修剪一棵树,用交叉验证
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Extracts an optimal subtree from a tree object of the classes treethresh or wtthresh. Contrary to subtree the values of the complexity parameter C does not need to be given, but is determined using cross-validation.
提取的最优子树树对象的类treethresh或wtthresh。相反,subtree的复杂参数C的值并不需要给予,但被确定使用交叉验证。
用法----------Usage----------
prune(object, v=5, sd.mult=0.5, plot=TRUE)
prune.treethresh(object, v=5, sd.mult=0.5, plot=TRUE)
prune.wtthresh(object, v=5, sd.mult=0.5, plot=TRUE)
参数----------Arguments----------
参数:object
An object of the class treethresh or wtthresh according to which thresholding is to be carried out.
一个对象的类treethresh或wtthresh根据该阈值是被进行。
参数:v
The number of folds in the cross-validation used to determine the optimal subtree in the pruning step (see below for details).
倍数数的交叉验证,以确定最佳的子树的修剪步骤(见下文)。
参数:sd.mult
The smallest subtree that is not sd.mult times the standard error worse than the best loglikelihood will be chosen as the optimal tree in the pruning step. (see below for details).
将被选择作为最优树修剪步骤中最小的子树是不是sd.mult时间差的标准误差比最好loglikelihood。 (见下文)。
参数:plot
If plot=TRUE a plot of the relative predicted loglikelihood estimated in the cross-validation against the complexity parameter C is produced.
如果plot=TRUE一块相对预测中的交叉验证对复杂参数C是loglikelihood估计。
参数:...
additional arguments (see above for supported arguments).
额外的参数(见上面的支持的参数)。
Details
详细信息----------Details----------
The tree grown by treethresh or wtthresh often yields too many partitions leading to an overfit. The resulting tree has to be 'pruned', i.e. the branches corresponding to the least important regions have to be 'snipped off'.
treethresh或wtthresh往往会产生太多的分区导致的过度拟合的树生长。得到的树“修剪”,即分支机构的最重要的区域有被“剪掉”。
As the TreeThresh model is a special case of a classification and regression tree, there exists a sequence of nested subtrees (i.e. a sequence of nested partitions) that maximises the regularised loglikelihood
,由于TreeThresh模型的分类和回归树是一种特殊情况,存在一个嵌套的子树(即嵌套分区的序列)序列最大化正规化loglikelihood
The parameter alpha controls the complexity of the resulting partition. For alpha=0 no pruning is carried out. If a large enough alpha is chosen, only the root node of the tree is retained, i.e. no partitioning is done. Denote this value of alpha by alpha_0. The complexity parameter can thus be rescaled to
参数alpha控制的复杂性,所得到的分区。对于alpha=0没有修剪进行。如果选择一个足够大的alpha,只有树的根节点被保留,即没有进行分区。记alphaalpha_0。因此,可以重新调整到复杂参数
The optimal value of the complexity parameter C (or, equivalently, alpha) depends on the problem at hand and thus has to be chosen carefully. prune estimates the optimal complexity parameter C by a v-fold cross-validation. If sd.mult=0 the value of C that yields the highest predictive loglikelihood in the cross-validation is used to prune the tree object. If sd.mult is not 0 the largest C that is not sd.mult standard errors worse than the best C is used.
复杂度参数的最优值的C(或者,等价地,alpha)取决于手头上的问题,因此,必须仔细选择。 prune估计的最优复杂参数C一个v-fold交叉验证。如果sd.mult=0值C,收益率最高的交叉验证的的预测loglikelihood在是用来修剪树object。如果sd.mult不0大C是不是sd.mult标准比最好的C使用更糟糕的错误。
值----------Value----------
prune returns an object of the class treethresh or wtthresh that contains a tree pruned at value C (see the function prune for details on the pruning process).
prune返回一个类的对象treethresh或wtthresh,其中包含一个树修剪值C(见功能prune在修剪过程中的详细信息) 。
注意----------Note----------
prune.treethresh and prune.wtthresh should rarely be directly called by the user. The more user-friendly S3 function prune will take care of calling the right function.
prune.treethresh和prune.wtthresh应该很少由用户直接调用。更加人性化的S3功能prune会照顾调用正确的函数。
参见----------See Also----------
treethresh, wtthresh, get.t, prune
treethresh,wtthresh,get.t,prune
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|