FUNCTION REFERENCE
ClassificationBaggedEnsemble
Bagged classification ensemble returned by fitcensemble with Method set to 'Bag'.
Bagged classification ensemble returned by fitcensemble with Method set to 'Bag'.
Syntax
mdl = fitcensemble(X, Y, 'Method', 'Bag')Stores bootstrap-aggregated decision trees and in-bag indices. Supports oobLoss in addition to predict, resubLoss, loss, crossval and predictorImportance.
Example
mdl = fitcensemble([0; 1; 2; 3], [1; 1; 2; 2], 'Method', 'Bag', 'NumLearningCycles', 5); class(mdl) % 'ClassificationBaggedEnsemble'Differences from MATLAB: Numeric predictors only.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.