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 HSGP class 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:
mint

Number of basis functions. Default is 200.

Lfloat, 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 to c=2 in HSGP). By default it is None.

eta_lamfloat

Exponential prior for the variance. Default is 1.

ls_mufloat

Mean of the inverse gamma prior for the lengthscale. Default is 5.

ls_sigmafloat

Standard deviation of the inverse gamma prior for the lengthscale. Default is 5.

cov_funcCovFunc, optional

Covariance function enum. Supported values: ExpQuad, Matern52, Matern32. By default it is None (resolved to Matern52 at model-build time).

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.

[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, ...])

HSGPKwargs.model_parametrized_name(params)

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_fields

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

m

L

eta_lam

ls_mu

ls_sigma

cov_func