I'm not very familiar with the EM algorithm for the Kalman Filter. I've been using pykalman to do my analysis in Python. The package comes with a simple EM algo:
kf = KalmanFilter(transition_matrices = [[1, 1], [0, 1]], observation_matrices = [[0.1, 0.5], [-0.3, 0.0]]) measurements = np.asarray([[1,0], [0,0], [0,1]]) # 3 observations kf = kf.em(measurements, n_iter=5) (filtered_state_means, filtered_state_covariances) = kf.filter(measurements)
I was wondering whether using the EM algorithm to estimate the Kalman filter parameters induces some kind of look-ahead bias. Like does the EM algorithm use the full sample observation points to estimate the parameters, or does it only use the points from time t=0 to time t-1?