Python Kalman filtering and optimal estimation library. Implements Kalman filter, particle filter, Extended Kalman filter, Unscented Kalman filter, g-h (alpha-beta), least squares, H Infinity, smoothers, and more. Has companion book 'Kalman and Bayesian Filters in Python'.
We have typically initialized the KF with the first measurement or 2 measurements (to get velocity). Hence we need to skip the first measurement. So len(mu) +1 = len(zs), and the rts smoother skips the first measurement.
You can get around this by setting zs[0] to None, and update_first=True, but then the final kf state is the prior of predicting past zs, which is not the end of the world, but not awesome either.
I'm not sure what I want here. A flag to just copy the initial x, P of the kf?
Consider the typical workflow:
We have typically initialized the KF with the first measurement or 2 measurements (to get velocity). Hence we need to skip the first measurement. So len(mu) +1 = len(zs), and the rts smoother skips the first measurement.
You can get around this by setting zs[0] to None, and update_first=True, but then the final kf state is the prior of predicting past zs, which is not the end of the world, but not awesome either.
I'm not sure what I want here. A flag to just copy the initial x, P of the kf?