Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

predict - Class: TreeBagger

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS