MarkovSwitchingSSM.density_matrix#

MarkovSwitchingSSM.density_matrix(target, lags)[source]#

The (T_eff, K) log-density matrix the recursions consume.

Exposed alongside filter() so a caller that already holds the trimmed target and lag block – an EM loop, which rebuilds them once and reuses them across every iteration – can skip re-deriving them from the raw series on each pass.

Return type:

NDArray[double]