在live d上使用pykalman

2024-04-28 15:57:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我在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)

Tags: 数据import示例documentationnpfilteredmeansstate