statsmodels.regression.linear_model.OLS.predict

OLS.predict(params, exog=None)

Return linear predicted values from a design matrix.

Parameters:
paramsarray_like

Parameters of a linear model.

exogarray_like, optional

Design / exogenous data. Model exog is used if None.

Returns:
array_like

An array of fitted values.

Notes

If the model has not yet been fit, params is not optional.


Last update: Nov 14, 2024