HSGPKwargs#
- class pymc_marketing.hsgp_kwargs.HSGPKwargs(**data)[source]#
HSGP keyword arguments for the time-varying prior.
See [1] and [2] for the theoretical background on the Hilbert Space Gaussian Process (HSGP). See , [6] for a practical guide through the method using code examples. See the
HSGPclass for more information on the Hilbert Space Gaussian Process in PyMC. We also recommend the following resources for a more practical introduction to HSGP: [3], [4], [5].- Parameters:
- m
int Number of basis functions. Default is 200.
- L
float, optional Extent of basis functions. Set this to reflect the expected range of in+out-of-sample data (considering that time-indices are zero-centered).Default is
X_mid * 2(identical toc=2in HSGP). By default it is None.- eta_lam
float Exponential prior for the variance. Default is 1.
- ls_mu
float Mean of the inverse gamma prior for the lengthscale. Default is 5.
- ls_sigma
float Standard deviation of the inverse gamma prior for the lengthscale. Default is 5.
- cov_func
CovFunc, optional Covariance function enum. Supported values:
ExpQuad,Matern52,Matern32. By default it is None (resolved toMatern52at model-build time).
- m
References
[1]Solin, A., Sarkka, S. (2019) Hilbert Space Methods for Reduced-Rank Gaussian Process Regression.
[2]Ruitort-Mayol, G., and Anderson, M., and Solin, A., and Vehtari, A. (2022). Practical Hilbert Space Approximate Bayesian Gaussian Processes for Probabilistic Programming.
[3]PyMC Example Gallery: “Gaussian Processes: HSGP Reference & First Steps”.
[4]PyMC Example Gallery: “Gaussian Processes: HSGP Advanced Usage”.
[5]PyMC Example Gallery: “Baby Births Modelling with HSGPs”.
Methods
HSGPKwargs.__init__(**data)Create a new model by parsing and validating input data from keyword arguments.
HSGPKwargs.construct([_fields_set])HSGPKwargs.copy(*[, include, exclude, ...])Returns a copy of the model.
HSGPKwargs.dict(*[, include, exclude, ...])HSGPKwargs.from_dict(data)Reconstruct from a dict.
HSGPKwargs.from_orm(obj)HSGPKwargs.json(*[, include, exclude, ...])Compute the class name for parametrizations of generic classes.
HSGPKwargs.parse_file(path, *[, ...])HSGPKwargs.parse_obj(obj)HSGPKwargs.parse_raw(b, *[, content_type, ...])HSGPKwargs.schema([by_alias, ref_template])HSGPKwargs.schema_json(*[, by_alias, ...])HSGPKwargs.to_dict([_orig])HSGPKwargs.update_forward_refs(**localns)HSGPKwargs.validate(value)Attributes
model_computed_fieldsmodel_configConfiguration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns the set of fields that have been explicitly set on this model instance.
mLeta_lamls_muls_sigmacov_func