dynamax icon indicating copy to clipboard operation
dynamax copied to clipboard

[Question] Why compute posterior as `prior_cov - K @ S @ K.T`?

Open gorold opened this issue 7 months ago • 0 comments

I'm curious why the implementation computes the update step using this approach:

https://github.com/probml/dynamax/blob/800fae691edc7a372605a230d91344bd4420fd93/dynamax/linear_gaussian_ssm/inference.py#L303

Is there an advantage in numerical stability or some other advantage in doing so? Would it not be more efficient to compute $C = \Sigma H^T$ as such?

C = prior_cov @ emission_matrix.T
S = emission_cov + emission_matrix @ C
K = psd_solve(S, C.T).T
Sigma_cond = prior_cov - K @ C.T

gorold avatar Jul 08 '25 10:07 gorold