Predict response
Syntax
Y = predict(B,X)
Y = predict(B,X,'param1',val1,'param2',val2,...)
Description
Y = predict(B,X) computes predicted response
of the trained ensemble B for data X.
The output has one prediction for each row of X.
The returned Y is a cell array of strings for classification
and a numeric array for regression.
Y = predict(B,X,'param1',val1,'param2',val2,...) specifies
optional parameter name/value pairs:
| 'trees' | Array of tree indices to use for computation of responses.
Default is 'all'. |
| 'treeweights' | Array of NTrees weights for weighting votes
from the specified trees. |
| 'useifort' | Logical matrix of size Nobs-by-NTrees indicating
which trees to use to make predictions for each observation. By default
all trees are used for all observations. |
See Also
CompactTreeBagger.predict
 | predict (NaiveBayes) | | princomp |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit