FUNCTION REFERENCE
GeneralizedLinearModel.predict
Predict responses from a fitted GeneralizedLinearModel object.
Predict responses from a fitted GeneralizedLinearModel object.
Syntax
ypred = predict(mdl, Xnew)Syntax
ypred = mdl.predict(Xnew)Syntax
[ypred, yci] = predict(mdl, Xnew)predict(mdl, Xnew) returns mean predictions and, with two outputs, confidence intervals on the response scale. The method form mdl.predict(Xnew) returns only the predictions.
Example
mdl = fitglm([1; 2; 3; 4], [2; 4; 6; 8]); mdl.predict(5) % 10Differences from MATLAB: Supports numeric matrix predictors.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.