# Switching Kalman filter

The switching Kalman filtering (SKF) method is a variant of the Kalman filter. In its generalised form, it is often attributed to Kevin P. Murphy, but related switching state-space models have been in use.

## Applications

Applications of the switching Kalman filter include: brain-computer interfaces and neural decoding, real-time decoding for continuous neural-prosthetic control, and sensorimotor learning in humans. It also has application in econometrics, signal processing, tracking, computer vision, etc. It is an alternative to the Kalman filter when the system's state has a discrete component. For example, when an industrial plant has "multiple discrete modes of behaviour, each of which having a linear (Gaussian) dynamics".

## Model

There are several variants of SKF discussed in.

### Special case

In the simpler case, switching state-space models are defined based on a switching variable which evolves independent of the hidden variable. The probabilistic model of such variant of SKF is as the following:

[This section is badly written: It does not explain the notation used below.]

{\begin{aligned}&\Pr(\{S_{t},X_{t}^{(1)},\ldots ,X_{t}^{(M)},Y_{t}\})\\={}&\Pr(S_{1})\prod _{t=2}^{T}\Pr(S_{t}\mid S_{t-1})\times \prod _{m=1}^{M}\Pr(X_{1}^{(m)})\prod _{t=2}^{T}\Pr(X_{t}^{(m)}\mid X_{t-1}^{(m)})\times \prod _{t=1}^{T}\Pr(Y_{t}\mid X_{t}^{(1)},\ldots ,X_{t}^{(M)},S_{t}).\end{aligned}}

The hidden variables include not only the continuous $X$ , but also a discrete *switch* (or switching) variable $S_{t}$ . The dynamics of the switch variable are defined by the term $\Pr(S_{t}\mid S_{t-1})$ . The probability model of $X$  and $Y$  can depend on $S_{t}$ .

The switch variable can take its values from a set $S_{t}\in \{1,2,\ldots ,M\}$ . This changes the joint distribution $(X_{t},Y_{t})$  which is a separate multivariate Gaussian distribution in case of each value of $S_{t}$ .

### General case

In more generalised variants, the switch variable affects the dynamics of $X_{t}$ , e.g. through $\Pr(X_{t}\mid X_{t-1},S_{t})$ . The filtering and smoothing procedure for general cases is discussed in.