Compact ensemble of decision trees grown by bootstrap aggregation
CompactTreeBagger
class is a lightweight class that contains the trees grown usingTreeBagger
.CompactTreeBagger
does not preserve any information about howTreeBagger
grew the decision trees. It does not contain the input data used for growing trees, nor does it contain training parameters such as minimal leaf size or number of variables sampled for each decision split at random. You can only useCompactTreeBagger
for predicting the response of the trained ensemble given new dataX
, and other related functions.
CompactTreeBagger
lets you save the trained ensemble to disk, or use it in any other way, while discarding training data and various parameters of the training configuration irrelevant for predicting response of the fully grown ensemble. This reduces storage and memory requirements, especially for ensembles trained on large data sets.
CompactTreeBagger | Create CompactTreeBagger object |
creates a compact version ofCMdl
= compact(Mdl
)Mdl
, aTreeBagger
model object. You can predict regressions usingCMdl
exactly as you can usingMdl
. However, sinceCMdl
does not contain training data, you cannot perform some actions, such as make out-of-bag predictions usingoobPredict
.
combine |
Combine two ensembles |
error |
Error (misclassification probability or MSE) |
margin |
分类margin |
mdsprox |
Multidimensional scaling of proximity matrix |
meanMargin |
Mean classification margin |
outlierMeasure |
Outlier measure for data |
partialDependence |
Compute partial dependence |
plotPartialDependence |
Create partial dependence plot (PDP) and individual conditional expectation (ICE) plots |
predict |
Predict responses using ensemble of bagged decision trees |
proximity |
Proximity matrix for data |
setDefaultYfit |
Set default value forpredict |
|
The |
|
The For classification, you can set this property to either 对于回归,可以将此属性设置为numeric scalar. The default is the mean of the response for the training data. |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
Value. To learn how this affects your use of the class, seeComparing Handle and Value Classesin the MATLAB®Object-Oriented Programming documentation.
TheTrees
property ofCMdl
stores a cell vector ofCMdl.NumTrees
CompactClassificationTree
orCompactRegressionTree
model objects. For a textual or graphical display of treet
in the cell vector, enter
view(CMdl.Trees{t})