Predict responses of generalized linear regression model using one input for each predictor
returns the predicted response of ypred
= feval(mdl
,Xnew1,Xnew2,...,Xnewn
)mdl
to the new input predictors
Xnew1,Xnew2,...,Xnewn
.
A regression object is, mathematically, a function that estimates the relationship between the response and predictors. The feval
function enables an object to behave like a function in MATLAB®. You can pass feval
to another function that accepts a function input, such as fminsearch
and integral
.
feval
can be simpler to use with a model created from a table or dataset array. When you have new predictor data, you can pass it to feval
without creating a table or matrix.
predict
gives the same predictions as
feval
if you use the default values for the 'Offset'
and
'BinomialSize'
name-value pair arguments of predict
. The prediction values
can be different if you specify other values for these arguments. The
predict
function also returns confidence intervals on
its predictions. Note that the predict
function accepts a
single input argument containing all predictor variables, rather than multiple
input arguments with one input for each predictor variable.
random
predicts responses with added
noise.
CompactGeneralizedLinearModel
| GeneralizedLinearModel
| predict
| random