pyActigraphy.analysis.SSA.fit

SSA.fit(check_finite=False, overwrite_a=True)[source]

Singular value decomposition of the trajectory matrix. Wrapper around the scipy.linalg.svd function.

Parameters
  • overwrite_a (bool, optional) – Whether to overwrite a; may improve performance. Default is False.

  • check_finite (bool, optional) – Whether to check that the input matrix contains only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs. Default is True.

Notes

Factorization of the trajectory matrix A, using Singular Value Decomposition (SVD), yields to [1]:

\[\begin{split}A &= U\Sigma V^\intercal \\ &= \sum_{r=1}^{R} \sigma_r u_r v_{r}^\intercal\end{split}\]

where \(R = rank(A) \leq L\), \({u_1,\ldots, u_d }\) is the corresponding orthonormal system of the eigenvectors of the matrix \(S = AA^{\intercal}\) such as \(ui \cdot uj = 0\) for \(i \neq j\) and \(\lVert u_r \rVert = 1\), \(v_r = A^{\intercal} u_r / \sigma_r\), and \(\Sigma\) is a diagonal matrix \(\in \mathbb{R}^{L×K}\), whose diagonal elements \({\sigma_r}\) are the singular values of A. The eigenvalues of \(AA^\intercal\) are given by \(\lambda_r = \sigma_r^2\).

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