Skip to content

Commit 10b8699

Browse files
Remove special logic for solve_discrete_lyapunov
1 parent 8595dd7 commit 10b8699

File tree

1 file changed

+2
-5
lines changed
  • pymc_experimental/statespace/models

1 file changed

+2
-5
lines changed

pymc_experimental/statespace/models/ETS.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,20 +455,17 @@ def coords(self) -> dict[str, Sequence]:
455455

456456
return coords
457457

458-
def _stationary_initialization(self, T_stationary, mode=None):
458+
def _stationary_initialization(self, T_stationary):
459459
# Solve for matrix quadratic for P0
460460
R = self.ssm["selection"]
461461
Q = self.ssm["state_cov"]
462462

463-
# TODO: How to get mode information to here? It's not available when the model is created.
464-
method = "direct" if ((self.k_states < 50) or (mode == "JAX")) else "bilinear"
465-
466463
# ETS models are not stationary, but we can proceed *as if* the model were stationary by introducing large
467464
# dampening factors on all components. We then set the initial covariance to the steady-state of that system,
468465
# which we hope is similar enough to give a good initialization for the non-stationary system.
469466

470467
T_stationary = pt.specify_shape(T_stationary, (self.k_states, self.k_states))
471-
P0 = solve_discrete_lyapunov(T_stationary, pt.linalg.matrix_dot(R, Q, R.T), method=method)
468+
P0 = solve_discrete_lyapunov(T_stationary, pt.linalg.matrix_dot(R, Q, R.T))
472469
P0 = pt.specify_shape(P0, (self.k_states, self.k_states))
473470

474471
return P0

0 commit comments

Comments
 (0)