time_varying_prior#
- pymc_marketing.mmm.tvp.time_varying_prior(name, X, dims, X_mid=None, m=200, L=None, eta_lam=1, ls_mu=5, ls_sigma=5, cov_func=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.
- X1d array_like of
intorfloat Time points.
- X_mid
intorfloat Midpoint of the time points.
- dims
tupleofstrorstr 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).
- m
int Number of basis functions.
- L
int 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).- eta_lam
float Exponential prior for the variance.
- ls_mu
float Mean of the inverse gamma prior for the lengthscale.
- ls_sigma
float Standard deviation of the inverse gamma prior for the lengthscale.
- cov_func
pm.gp.cov.Covariance Covariance function.
- name
- Returns:
pt.TensorVariableTime-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.