在实时数据上使用pykalman

时间:2018-03-23 17:07:35

标签: python kalman-filter pykalman

我在pykalman documentation上看到的所有示例都适用于给定的数据集,我正在考虑如何在考虑时间增量的同时通过提供单个观察来使用它。

来自文档:

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)

0 个答案:

没有答案