time_varying_prior#

pymc_marketing.mmm.tvp.time_varying_prior(name, X, dims, X_mid=None, hsgp_kwargs=None)[source]#

Time varying prior, based on the Hilbert Space Gaussian Process (HSGP).

For more information see pymc.gp.HSGP.

Parameters:
namestr

Name of the prior and associated variables.

X1d array_like of int or float

Time points.

X_midint or float

Midpoint of the time points.

dimstuple of str or str

Dimensions of the prior. If a tuple, the first element is the name of the time dimension, and the second may be any other dimension, across which independent time varying priors for each coordinate are desired (e.g. channels).

hsgp_kwargsHSGPKwargs

Keyword arguments for the Hilbert Space Gaussian Process. By default it is None, in which case the default parameters are used. See HSGPKwargs for more information.

Returns:
pt.TensorVariable

Time-varying prior.

References

  • Ruitort-Mayol, G., and Anderson, M., and Solin, A., and Vehtari, A. (2022). Practical Hilbert Space Approximate Bayesian Gaussian Processes for Probabilistic Programming

  • Solin, A., Sarkka, S. (2019) Hilbert Space Methods for Reduced-Rank Gaussian Process Regression.