statsmodels.gam.generalized_additive_model.GLMGam.predict

method

GLMGam.predict(params, exog=None, exposure=None, offset=None, linear=False)

Return predicted values for a design matrix

Parameters
paramsarray-like

Parameters / coefficients of a GLM.

exogarray-like, optional

Design / exogenous data. Is exog is None, model exog is used.

exposurearray-like, optional

Exposure time values, only can be used with the log link function. See notes for details.

offsetarray-like, optional

Offset values. See notes for details.

linearbool

If True, returns the linear predicted values. If False, returns the value of the inverse of the model’s link function at the linear predicted values.

Returns
An array of fitted values

Notes

Any exposure and offset provided here take precedence over the exposure and offset used in the model fit. If exog is passed as an argument here, then any exposure and offset values in the fit will be ignored.

Exposure values must be strictly positive.