pyActigraphy.analysis.SSA.X_tilde

SSA.X_tilde(r)[source]

Diagonal averaged matrix.

Parameters

r (int or list of int) – Index of the elementary matrix to be diagonal-averaged. Must be lower than or equal to the embedding dimension, L. If a list of indices is given instead, the corresponding elementary matrices are grouped (ie. reduced to a single matrix by summation) before diagonal-averaging.

Returns

x_tilde

Return type

ndarray of shape (M,)

Notes

[1] : if the components of the series are separable and the indices are being split accordingly, then all the matrices in the expansion \(X = X_{I_1} + \ldots + X_{I_m}\) are the Hankel matrices. We thus immediately obtain the decomposition \(x_n = \sum_{k=1}^m \tilde{x}_n^{(k)}\) of the original series: for all k and n, \(\tilde{x}_n^{(k)}\) is equal to all entries \(x^{(k)}_{ij}\) along the antidiagonal \({(i, j)| i + j = n+1}\) of the matrix \(X_{Ik}\). In practice, however, this situation is not realistic. In the general case, no antidiagonal consists of equal elements. We thus need a formal procedure of transforming an arbitrary matrix into a Hankel matrix and therefore into a series. As such, we shall consider the procedure of diagonal averaging, which defines the values of the time series

\[\tilde{\mathbb{X}}^{(k)} = \left( \tilde{x}^{(k)}_1, \ldots, \tilde{x}^{(k)}_N \right)\]

as averages for the corresponding antidiagonals of the matrices \(X_{I_k}\).

  • for \(1 \leq n < L^{\star}\):

    \[\tilde{x}_n^{(k)} = \frac{1}{n} * \sum_{m=1}^{n} x^{\star}_{I_k, (m,n-m+1)}\]
  • for \(L^{\star} \leq n < K^{\star}\):

    \[\tilde{x}_n^{(k)} = \frac{1}{L^{\star}} * \sum_{m=1}^{L^{\star}} x^{\star}_{I_k, (m,n-m+1)}\]
  • for \(K^{\star} < n \leq N\):

    \[\tilde{x}_n^{(k)} = \frac{1}{N-n+1} * \sum_{m=n-K^{\star}+1}^{N-K^{\star}+1} x^{\star}_{I_k, (m,n-m+1)}\]

References

1

Golyandina, N., & Zhigljavsky, A. (2013). Singular Spectrum Analysis for Time Series. Springer Berlin Heidelberg http://doi.org/10.1007/978-3-642-34913-3