Closed miguel436 closed 1 year ago
You are using the default KalmanFilter by doing const kFilter = new pkg.KalmanFilter();
By default, the filter model is a 'constant-position' model.
It means that the prediction step will do x[t+1] = x[t]
(see documentation and the Wikipedia article about kalman-filter to understand more)
I'm curious about what do you expect exactly ? do you want the filter to "continue the trend" of previous observation ?
If this is the case, i would suggest you choose a "constant-speed" model, which will keep 1st-order trend in the filter. If you want 2nd order trend, you can play with "constant-acceleration" model.
Thank you! That's exactly what I was looking for! I want my filter to continue the trend of previous observations.
Hello! I have been testing this library by following the Online Kalman Filter example but I have some questions about the prediction results and would be grateful if someone could help me.
I started by running the following code:
After updating the filter based on all the available observations, I ran the
predict
method again to predict the next state while monitoring both the previous and the predicted states:The yielded results are the following:
Based on these logs, my question is: are the mean values supposed to be exactly the same ? I was expecting the mean value of the predicted state to be different from the one of the previous state.
Thanks for the awesome library!