我想尝试使用 pykalman 对来自传感器变量的数据应用卡尔曼滤波器。现在,我对观察数据有疑问。在示例中,3 个观测值是在三个瞬间测量的两个变量,或者是在一个瞬间测量的 3 个变量
from pykalman import KalmanFilter
>>> import numpy as np
>>> 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)
>>> (smoothed_state_means, smoothed_state_covariances) = kf.smooth(measurements)