mdl = fitrensemble(X, Y)
mdl = fitrensemble(X, Y, Name, Value)
yfit = predict(mdl, Xnew)
fitrensemble creates a RegressionEnsemble object from numeric predictors X and numeric response Y.
The current implementation supports Bag and LSBoost ensembles of tree learners. Name-value arguments include Method, Learners, NumLearningCycles, LearnRate, MaxNumSplits, MinLeafSize, MinParentSize, PredictorNames, and ResponseName.
X = [0; 1; 2; 3; 4; 5];
Y = [1; 1.2; 3; 3.2; 9; 9.1];
mdl = fitrensemble(X, Y, 'NumLearningCycles', 5);
yfit = predict(mdl, [1.5; 4.5])
| Version | Description |
|---|---|
| 2.0.0 | initial version |