8000 Pr 451 - modified and added tests to statespace by Dekermanjian · Pull Request #466 · pymc-devs/pymc-extras · GitHub
[go: up one dir, main page]

Skip to content

Pr 451 - modified and added tests to statespace #466

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

Merged
merged 9 commits into from
May 22, 2025
Prev Previous commit
Next Next commit
added logic to update static shape of target when forecasting with ex…
…ogenous variables
  • Loading branch information
Dekermanjian committed May 12, 2025
commit 3d9dd92ce1817acee7628ccfeabc91997c27a6ed
8 changes: 8 additions & 0 deletions pymc_extras/statespace/core/statespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2069,6 +2069,14 @@ def forecast(
data_dims=["data_time", OBS_STATE_DIM],
)

for name in self.data_names:
if name in scenario.keys():
pm.set_data(
{"data": np.zeros_like(scenario[name])},
coords={"data_time": np.arange(len(forecast_index))},
)
break

group_idx = FILTER_OUTPUT_TYPES.index(filter_output)
mu, cov = grouped_outputs[group_idx]

Expand Down
0