File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,8 @@ def make_symbolic_graph(self) -> None:
193
193
design_matrix = block_diag (* [Z for _ in range (self .k_endog )])
194
194
self .ssm ["design" , :, :] = pt .as_tensor_variable (design_matrix )
195
195
196
+ # selection matrix R defines structure of innovations (always identity for cycle components)
197
+ # when innovations=False, state cov Q=0, hence R @ Q @ R.T = 0
196
198
R = np .eye (2 ) # 2x2 identity for each cycle component
197
199
selection_matrix = block_diag (* [R for _ in range (self .k_endog )])
198
200
self .ssm ["selection" , :, :] = pt .as_tensor_variable (selection_matrix )
@@ -228,6 +230,9 @@ def make_symbolic_graph(self) -> None:
228
230
* [pt .eye (2 ) * sigma_cycle [i ] ** 2 for i in range (self .k_endog )]
229
231
)
230
232
self .ssm ["state_cov" ] = pt .specify_shape (state_cov , (self .k_states , self .k_states ))
233
+ else :
234
+ # explicitly set state cov to 0 when no innovations
235
+ self .ssm ["state_cov" , :, :] = pt .zeros ((self .k_posdef , self .k_posdef ))
231
236
232
237
def populate_component_properties (self ):
233
238
self .state_names = [
You can’t perform that action at this time.
0 commit comments