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
Covariance, optional Gaussian process Covariance function. By default it is None.
- 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_orm(obj)HSGPKwargs.json(*[, include, exclude, ...])HSGPKwargs.model_construct([_fields_set])Creates a new instance of the
Modelclass with validated data.HSGPKwargs.model_copy(*[, update, deep])!!! abstract "Usage Documentation"
HSGPKwargs.model_dump(*[, mode, include, ...])!!! abstract "Usage Documentation"
HSGPKwargs.model_dump_json(*[, indent, ...])!!! abstract "Usage Documentation"
HSGPKwargs.model_json_schema([by_alias, ...])Generates a JSON schema for a model class.
Compute the class name for parametrizations of generic classes.
HSGPKwargs.model_post_init(context, /)Override this method to perform additional initialization after
__init__andmodel_construct.HSGPKwargs.model_rebuild(*[, force, ...])Try to rebuild the pydantic-core schema for the model.
HSGPKwargs.model_validate(obj, *[, strict, ...])Validate a pydantic model instance.
HSGPKwargs.model_validate_json(json_data, *)!!! abstract "Usage Documentation"
HSGPKwargs.model_validate_strings(obj, *[, ...])Validate the given object with string data against the Pydantic model.
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.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