Compact ensemble of decision trees grown by bootstrap aggregation
CompactTreeBagger
class is a lightweight class that contains the
trees grown using TreeBagger
. CompactTreeBagger
does not preserve any information about how TreeBagger
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 use CompactTreeBagger
for
predicting the response of the trained ensemble given new data X
, 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 of CMdl
= compact(Mdl
)Mdl
, a TreeBagger
model object. You can predict regressions using
CMdl
exactly as you can using Mdl
. However,
since CMdl
does not contain training data, you cannot perform some
actions, such as make out-of-bag predictions using oobPredict
.
combine | Combine two ensembles |
error | Error (misclassification probability or MSE) |
margin | Classification 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 for predict |
|
The |
|
The For classification, you can set this property to either
For regression, you can set this property to any 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, see Comparing Handle and Value Classes in the MATLAB® Object-Oriented Programming documentation.
The Trees
property of CMdl
stores a cell
vector of CMdl.NumTrees
CompactClassificationTree
or CompactRegressionTree
model objects. For a textual or graphical display of
tree t
in the cell vector,
enter
view(CMdl.Trees{t})
ClassificationTree
| compact
| error
| predict
| RegressionTree
| TreeBagger
| view
| view