Main Content

ooberror.

Class:treebagger

Out-of-bag error

句法

err = ooberror(b)
Err = OobError(b,'param1',val1,'param2',val2,...)

描述

err = ooberror(b)computes the misclassification probability (for classification trees) or mean squared error (for regression trees) for out-of-bag observations in the training data, using the trained baggerB.E.rr是长度的矢量ntrees.,在哪里ntrees.is the number of trees in the ensemble.

Err = OobError(b,'param1',val1,'param2',val2,...)指定可选的参数名称/值对:

'模式' Character vector or string scalar indicating howooberror.计算错误。如果设置为'cumulative'(默认),该方法计算累积错误和E.rr是长度的矢量ntrees.,第一个元素给出错误树木(1),第二个元素给出错误树木(1:2)等等那up to树木(1:NTREES)。如果设置为'个人'E.rr是长度的矢量ntrees.,其中每个元素是集合中的每棵树中的错误。如果设置为'合奏'E.rris a scalar showing the cumulative error for the entire ensemble.
'Trees' 指示在此计算中包括什么树的索引矢量。默认情况下,此参数设置为'所有'and the method uses all trees. If'Trees'是一个数值向量,该方法返回一个向量啊f lengthntrees.对于'cumulative'and'个人'模式,哪里ntrees.is the number of elements in the input vector, and a scalar for'合奏'模式。For example, in the'cumulative'mode, the first element gives error from树木(1),第二个元素给出错误树木(1:2)等等
'TreeWeights' 树重量传染媒介。该矢量必须具有与'Trees'vector.ooberror.使用这些权重来通过拍摄加权平均值而不是简单的非重量的多数票来组合指定树的输出。您无法在此参数中使用此参数'个人'模式。

Algorithms

ooberror.估计加权集合误差以外的袋子观测。那是,ooberror.适用E.rror到存储在输入中的培训数据treebagger模型B.,并为每棵树选择袋袋观察以构成集合误差。

  • B.。XandB.。Y是培训数据预测器和响应。

  • B.。OOBIndices指定集合中的每棵树的观察是不合作的。

  • B.。W指定观察权重。

  • 可选择:

    • 使用'模式'name-value pair argument, you can specify to return the individual, weighted ensemble error for each tree, or the entire, weighted ensemble error. By default,ooberror.返回累积,加权集合错误。

    • 使用'Trees'名称值对参数,您可以选择在集合错误计算中使用哪些树。

    • 使用'TreeWeights'名称 - 值对参数,您可以使用重量归因于每棵树。

ooberror.应用下面描述的算法。有关更多详细信息,请参阅E.rrorandpredict

对于回归问题,ooberror.返回加权的MSE。

  1. ooberror.预测所有袋子观测的响应。

  2. MSE估计取决于价值'模式'

    • If you specify'模式','个人', 然后ooberror.将所选树内的袋子观测设置到所观察到的培训数据响应的加权样本平均值。然后,ooberror.computes the weighted MSE for each selected tree.

    • If you specify'模式','累积', 然后oOerror.返回累积,加权mses的向量,其中mseT.is the cumulative, weighted MSE for selected treeT.。计算MSET.,对于至少一棵树穿过树袋的每个观察T.ooberror.通过树计算预测响应的累积加权平均值T.ooberror.sets observations that are in bag for all selected trees through treeT.到观察到的培训数据响应的加权样本平均值。然后,ooberror.computes MSET.

    • If you specify'mode','senemble'然后,对于至少一棵树的袋子中的每个观察,ooberror.计算所有所选树的加权均值。ooberror.sets observations that are in bag for all selected trees to the weighted sample average of the observed, training data responses. Then,ooberror.计算加权MSE,与最终累积,加权的MSE相同。

在分类问题中,ooberror.returns the weighted misclassification rate.

  1. ooberror.predicts classes for all out-of-bag observations.

  2. 加权分类率估计取决于价值'模式'

    • If you specify'模式','个人', 然后ooberror.sets any in bag observations within a selected tree to the predicted, weighted, most popular class over all training responses. If there are multiple most popular classes,E.rror认为首先列出的人Classnames.property of thetreebagger模型是最受欢迎的。然后,ooberror.计算每个所选树的加权错误分类速率。

    • If you specify'模式','累积', 然后oOerror.returns a vector of cumulative, weighted misclassification rates, whereE.T.*是所选树的累积,加权错误分类率T.。To computeE.T.*,对于至少一棵树穿过树袋的每个观察T.ooberror.finds the predicted, cumulative, weighted most popular class through treeT.ooberror.sets observations that are in bag for all selected trees through treeT.对所有培训响应的加权,最受欢迎的课程。如果有多个最流行的课程,E.rror认为首先列出的人Classnames.property of thetreebagger模型是最受欢迎的。然后,ooberror.computesE.T.*

    • If you specify'mode','senemble'然后,对于至少一棵树的袋子中的每个观察,ooberror.computes the weighted, most popular class over all selected trees.ooberror.sets observations that are in bag for all selected trees through treeT.在所有培训响应中预测,加权,最受欢迎的课程。如果有多个最流行的课程,E.rror认为首先列出的人Classnames.property of thetreebagger模型是最受欢迎的。然后,ooberror.computes the weighted misclassification rate , which is the same as the final, cumulative, weighted misclassification rate.