fuzzyclust.timeseries.pca_segment_cost#
- fuzzyclust.timeseries.pca_segment_cost(X, n_components, cost='q', center=True)[source]#
Cost of approximating a segment by one PCA model with
n_componentscomponents.With the eigenvalues \(\lambda_1\ge\dots\ge\lambda_n\) of the covariance matrix of the segment (
center=True) or of its second-moment matrix \(\frac{1}{N}\sum_k\mathbf{x}_k\mathbf{x}_k^T\) (center=False, the uncentred form printed in the paper):"q"– mean reconstruction error, eq. (30) of Abonyi et al. (2005): \(\frac1N\sum_k Q_k = \frac1N\sum_k\mathbf{x}_k^T(\mathbf{I}-\mathbf{U}_p\mathbf{U}_p^T)\mathbf{x}_k=\sum_{j>p}\lambda_j\);"t2"– mean Hotelling \(T^2\), eq. (31): \(\frac1N\sum_k\mathbf{y}_k^T\mathbf{y}_k\) with \(\mathbf{y}_k=\mathbf{W}^T\mathbf{x}_k\), \(\mathbf{W}=\mathbf{U}_p\boldsymbol{\Lambda}_p^{1/2}\), which equals \(\sum_{j\le p}\lambda_j^2\).