probability icon indicating copy to clipboard operation
probability copied to clipboard

`LinearGaussianStateSpaceModel` filtering initial state is incorrect

Open Joshuaalbert opened this issue 1 year ago • 0 comments

The initial state for filter step is wrong, and is p(x0), when it should be p(x1|x0), i.e. kalman transition should already be applied to the initial state. This line.

Since the filter step does update first and transition second, the prior input to update step is expecting input to be p(x_k | x_k-1). This is performed in linear_gaussian_update, and you can see that it takes the carry value, which would point to p(x0) initially.

Further: to see why, take a look at the sampling method. The initial state is p(x0) and the sampling performs a transition first before sampling the observables.

Joshuaalbert avatar Mar 13 '24 14:03 Joshuaalbert