Skip to content

Commit

Permalink
Future-proof prior_linearized method call (#806)
Browse files Browse the repository at this point in the history
* modified: pymc_marketing/mmm/tvp.py

* Update tvp.py

Changed Xs to X in prior_linearized( as per the change in pymc)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: sangeedutta <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Will Dean <[email protected]>
  • Loading branch information
4 people authored and twiecki committed Sep 10, 2024
1 parent b0cb9a4 commit 10c0217
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymc_marketing/mmm/tvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def time_varying_prior(
hsgp_dims = (dims[1], "m")

gp = pm.gp.HSGP(m=[hsgp_kwargs.m], L=[hsgp_kwargs.L], cov_func=cov_func)
phi, sqrt_psd = gp.prior_linearized(Xs=X[:, None] - X_mid)
phi, sqrt_psd = gp.prior_linearized(X[:, None] - X_mid)
hsgp_coefs = pm.Normal(f"{name}_hsgp_coefs", dims=hsgp_dims)
f = phi @ (hsgp_coefs * sqrt_psd).T
f = pt.softplus(f)
Expand Down

0 comments on commit 10c0217

Please sign in to comment.