# smooth_rts¶

probnum.filtsmooth.smooth_rts(observations, locations, F, L, H, R, m0, C0, prior_model='continuous')[source]

Estimate an unknown, hidden trajectory from a set of observations with a Rauch-Tung-Striebel smoother.

A Rauch-Tung-Striebel smoother estimates the unknown trajectory $$X$$ from a set of observations Y. There is a continuous-discrete and a discrete-discrete version (describing whether the prior model and measurement model are continuous/discrete).

In a continuous-discrete model, the prior distribution is described by the SDE

$\text{d}X(t) = F X(t) \text{d}t + L \text{d}W(t)$

driven by Wiener process $$W$$ and subject to initial condition

$X(t_0) \sim N(m_0, C_0).$

By default, $$t_0$$ is set to the location of the first observation.

In a discrete-discrete model, the prior distribution is described by the transition

$X_{n+1} \,|\, X_n \sim N(F X_n, L)$

subject to the same initial condition.

In both cases, the measurement model is (write $$X(t_n)=X_n$$ in the continuous case)

$Y_n \,|\, X_n \sim N(H X_n, R)$

and the Rauch-Tung-Striebel smoother estimates $$X$$ given $$Y_n=y_n$$, $$Y=[y_1, ..., y_N]$$.

Parameters
• observations(shape=(N, m)) – A list of noisy observations of the hidden trajectory.

• locations(shape=(N, )) – Time-locations of the observations.

• F(shape=(n, n)) – State transition matrix. Either the drift matrix in an SDE model, or the transition matrix in a discrete model (depending on the value of prior_model).

• L(shape=(n, n)) or (shape=(n, s)) – Diffusion/dispersion matrix. Either the dispersion matrix in an SDE model, or the diffusion matrix in a discrete model (depending on the value of prior_model). In a continuous model, the matrix has shape (n, s) for s-dimensional driving Wiener process. In a discrete model, the matrix has shape (n, n).

• H(shape=(m, n)) – Transition matrix of the (discrete) observation model.

• R(shape=(m, m)) – Covariance matrix of the observation noise.

• m0(shape=(n,)) – Initial mean of the prior model.

• C0(shape=(n, n)) – Initial covariance of the prior model.

• prior_model – Either discrete (discrete) or continuous (continuous). This affects the role of F and L. Optional. Default is continuous.

Raises

ValueError – If prior_model is neither discrete nor continuous.

Returns

Smoothing distribution as returned by the Rauch-Tung-Striebel smoother.

Return type

gaussian.SmoothingPosterior