We introduce a new statistical model for time series that iteratively segme
nts data into regimes with approximately linear dynamics and learns the par
ameters of each of these linear regimes. This model combines and generalize
s two of the most widely used stochastic time-series models-hidden Markov m
odels and linear dynamical systems-and is closely related to models that ar
e widely used in the control and econometrics literatures. It can also be d
erived by extending the mixture of experts neural network (Jacobs, Jordan,
Nowlan, & Hinton, 1991) to its fully dynamical version, in which both exper
t and gating networks are recurrent. Inferring the posterior probabilities
of the hidden states of this model is computationally intractable, and ther
efore the exact expectation maximization (EM) algorithm cannot be applied.
However, we present a variational approximation that maximizes a lower boun
d on the log-likelihood and makes use of both the forward and backward recu
rsions for hidden Markov models and the Kalman filter recursions for linear
dynamical systems. We tested the algorithm on artificial data sets and a n
atural data set of respiration force from a patient with sleep apnea. The r
esults suggest that variational approximations are a viable method for infe
rence and learning in switching state-space models.