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:
  • name (str) – Name of the prior and associated variables.

  • X (XTensorVariable) – Time points.

  • X_mid (int | float | None) – Midpoint of the time points.

  • dims (str | Sequence[str | None]) – 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_kwargs (HSGPKwargs | None) – 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.

Return type:

XTensorVariable

Returns:

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.