TreeBagger class -
Bootstrap aggregation for ensemble of decision trees
Description
TreeBagger bags an ensemble of decision trees
for either classification or regression. Bagging stands for bootstrap
aggregation. Every tree in the ensemble is grown on an independently
drawn bootstrap replica of input data. Observations not included in
this replica are "out of bag" for this tree. To compute prediction
of an ensemble of trees for unseen data, TreeBagger takes
an average of predictions from individual trees. To estimate the prediction
error of the bagged ensemble, you can compute predictions for each
tree on its out-of-bag observations, average these predictions over
the entire ensemble for each observation and then compare the predicted
out-of-bag response with the true value at this observation.
TreeBagger relies on the classregtree functionality
for growing individual trees. In particular, classregtree accepts
the number of features selected at random for each decision split
as an optional input argument.
The Compact property contains another class, CompactTreeBagger,
with sufficient information to make predictions using new data. This
information includes the tree ensemble, variable names, and class
names (for classification). CompactTreeBagger requires
less memory than TreeBagger, but only TreeBagger has
methods for growing more trees for the ensemble. Once you grow an
ensemble of trees using TreeBagger and no longer
need access to the training data, you can opt to work with the compact
version of the trained ensemble from then on.
Construction
| TreeBagger | Create ensemble of bagged decision trees |
Methods
Properties
Copy Semantics
Value. To learn how this affects your use of the class, see Comparing Handle and Value
Classes in the MATLAB Object-Oriented Programming documentation.
See Also
Regression and Classification by Bagging Decision Trees
Classification
Trees
Regression
Tress
Grouped
Data
 | TreeArgs property (TreeBagger) | | TreeBagger |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit