mvtsa.preprocessing.dynamize#

mvtsa.preprocessing.dynamize(X, lags)[source]#

Lag-extended data matrix of dynamic PCA (Ku, Storer and Georgakis, 1995).

Row k is [x(k), x(k-1), ..., x(k-l)]; the result has T - l rows and n (l + 1) columns. Row k of the result corresponds to sample k + l of X.

>>> dynamize(np.arange(5.0), 2).tolist()
[[2.0, 1.0, 0.0], [3.0, 2.0, 1.0], [4.0, 3.0, 2.0]]