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.
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.