Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle dims for intercept #1514

Open
wd60622 opened this issue Feb 19, 2025 · 0 comments
Open

Handle dims for intercept #1514

wd60622 opened this issue Feb 19, 2025 · 0 comments
Labels
MMM TVPs Related to time varying parameters

Comments

@wd60622
Copy link
Contributor

wd60622 commented Feb 19, 2025

For base the tvp and non-tvp case, if the specified dims of intercept does match.

if self.time_varying_intercept:
baseline_intercept = self.model_config["intercept"].create_variable(
"baseline_intercept"
)
intercept_latent_process = SoftPlusHSGP.parameterize_from_data(
X=time_index, # this is
dims=("date", *self.dims),
**self.model_config["intercept_tvp_config"],
).create_variable("intercept_latent_process")
intercept = pm.Deterministic(
name="intercept_contribution",
var=baseline_intercept[None, ...] * intercept_latent_process,
dims=("date", *self.dims),
)
else:
intercept = self.model_config["intercept"].create_variable(
name="intercept_contribution"
)

"intercept": Prior("Normal", mu=0, sigma=2, dims=self.dims),

EDIT: Realizing that this might be an edge case where there are more than 1 dimension specified

@wd60622 wd60622 changed the title Allow intercept to include extra dimensions Handle dims for intercept Feb 19, 2025
@wd60622 wd60622 added MMM TVPs Related to time varying parameters and removed Needs Triage labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MMM TVPs Related to time varying parameters
Projects
None yet
Development

No branches or pull requests

1 participant