Answer the question
In order to leave comments, you need to log in
What is transition_matrices and observation_matrix in Kalman filter?
What is transition_matrices and observation_matrix in Kalman filter?
measurements = np.asarray(massgps)
initial_state_mean = [measurements[0, 0],0,measurements[0, 1],0]
transition_matrix =
observation_matrix =
kf1 = KalmanFilter(transition_matrices = transition_matrix,observation_matrices = observation_matrix,initial_state_mean = initial_state_mean)
kf1 = kf1.em(measurements, n_iter=5)
(smoothed_state_means, smoothed_state_covariances) = kf1.smooth(measurements)
Answer the question
In order to leave comments, you need to log in
Take this image from the wiki
(The article itself)
This is a matrix representation of the equation of motion. The transition matrix is this same Fk, i.e. a transition matrix that links the previous state vector x_k-1 and the current x_k.
For example, for the system diff. equations:
v1 = 3 * x1 + 0.1 * x2
v2 = 0.3 * x1 + 0.5 * x2
The transition matrix will be , where v1, v2 are the first derivatives of x1 and x2 respectively.
There is also a measurement verctor z, which is associated with the state vector X through the matrix H.
This Hk is the observation matrix.
How to get it if you only have a diff. equations? Well, substitute the current values \u200b\u200binto the system, and look at the coefficients (in general, there are many ways to linearize)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question