Skip to content

Commit c0a4a47

Browse files
committed
1. removed incorrectly comitted file test_structural.py
2. replaced scipy block diag with pytensor block diag 3. Added forecast to test model in multivariate ssm notebook
1 parent 7e9bb07 commit c0a4a47

File tree

3 files changed

+735
-955
lines changed

3 files changed

+735
-955
lines changed

notebooks/multivariate_ssm.ipynb

Lines changed: 734 additions & 113 deletions
Large diffs are not rendered by default.

pymc_extras/statespace/models/structural/components/regression.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import numpy as np
22

33
from pytensor import tensor as pt
4-
from scipy import linalg
54

65
from pymc_extras.statespace.models.structural.core import Component
76
from pymc_extras.statespace.utils.constants import TIME_DIM
@@ -69,7 +68,7 @@ def make_symbolic_graph(self) -> None:
6968

7069
self.ssm["initial_state", :] = betas.reshape((1, -1)).squeeze()
7170
T = np.eye(k_states)
72-
self.ssm["transition", :, :] = linalg.block_diag(*[T for _ in range(k_endog)])
71+
self.ssm["transition", :, :] = pt.linalg.block_diag(*[T for _ in range(k_endog)])
7372
self.ssm["selection", :, :] = np.eye(self.k_states)
7473
Z = pt.linalg.block_diag(*[pt.expand_dims(regression_data, 1) for _ in range(k_endog)])
7574
self.ssm["design"] = pt.specify_shape(

0 commit comments

Comments
 (0)