statsmodels.gam.generalized_additive_model.GLMGam.get_distribution¶
-
GLMGam.get_distribution(params, scale=1.0, exog=None, exposure=None, offset=None)¶ Return a random number generator for the predictive distribution.
- Parameters
- paramsarray_like
The model parameters.
- scalescalar
The scale parameter.
- exogarray_like
The predictor variable matrix.
- Returns
genFrozen random number generator object. Use the
rvsmethod to generate random values.
Notes
Due to the behavior of
scipy.stats.distributions objects, the returned random number generator must be called withgen.rvs(n)wherenis the number of observations in the data set used to fit the model. If any other value is used forn, misleading results will be produced.