I would like to use Kalman filter to fit my data and make predictions. My data contains control variables, so for example it may look like:
U = [[1,2,3], [4,5,6], [7,8,9]]
X = [1,4,7]
Where U
are the control variables and X
are the observations for 3 consecutive timestamps. I would like to fit the filter parameters to this data, and then predict the next observation (for which I also have control variables).
I tried to use pykalman
package. It has an em function that fit the filter parameters, but it seems that it does not include control variables as a possible input (unless I am missing something?)
Another option that I tried is filterpy.kalman.KalmanFilter. It does allow to input control variables, but I couldn't understand how to use this package to estimate the parameters of the filter. Are any of these packages can do the job, or if not, is there any other package that may be useful?