FUNCTION REFERENCE
RegressionTree.predict
Predict numeric responses from a RegressionTree model.
Predict numeric responses from a RegressionTree model.
Syntax
ypred = predict(mdl, Xnew)Routes each row of Xnew down the fitted regression tree and returns leaf mean predictions.
Example
mdl = fitrtree([1; 2; 3; 4], [10; 10; 20; 20], 'MinParentSize', 2); predict(mdl, 3.5) % 20Differences from MATLAB: Numeric predictors only; call as predict(mdl, Xnew).
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.