10000 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
Add some checks to test_foreacast_valid_index
  • Loading branch information
jessegrabowski committed May 22, 2025
commit 13b18fd57b55222267062d657bf6b2dca8d5aa0a
9 changes: 9 additions & 0 deletions tests/statespace/test_statespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,3 +917,12 @@ def test_foreacast_valid_index(exog_pymc_mod, exog_ss_mod, exog_data):

# Generate the forecast
forecasts = exog_ss_mod.forecast(idata.prior, scenario=scenario, use_scenario_index=True)
assert "forecast_latent" in forecasts
assert "forecast_observed" in forecasts

assert (forecasts.coords["time"].values == scenario["data_exog"].index.values).all()
assert not np.any(np.isnan(forecasts.forecast_latent.values))
assert not np.any(np.isnan(forecasts.forecast_observed.values))

assert forecasts.forecast_latent.shape[2] == n_periods
assert forecasts.forecast_observed.shape[2] == n_periods
0