TuringLang / GeneralisedFilters.jl

Filtering and smoothing algorithms for state space models with analytic (or approximately/partially analytic) solutions
MIT License
0 stars 0 forks source link

Inconsistency between `initialise` for KF and BF #14

Open THargreaves opened 4 days ago

THargreaves commented 4 days ago

I just noticed that we have different definitions of initialise for the Kalman filter and bootstrap filter.

The bootstrap filter returns a container with the proposed and filtered states whereas the Kalman filter returns only the current state.

Obviously we could just change the Kalman filter to return a container of two Gaussians but then we run into an issues with Rao-Blackwellisation. Specifically, the initialise for a RBPF should return a container where each state is a combination of particles (set by the outer algorithm) and some marginalised distribution (set by the black-box inner algorithm, e.g. KF). If the inner algorithm returns a container, we'd have to add some glue code to insert this into the container the RBPF wants which seems a bit ugly to me.

Not sure exactly what the best way about this is but we can get by without this change for now.

charlesknipp commented 4 days ago

I ran into this exact issue when initially porting the interface. I left the GaussianState container unused as a result; although it is my intention to revisit this in the near future.