A beginner’s explanation for PCA on a multivariate time series

70 Views Asked by At

This is very much a beginner’s question.

Say you have a 10 dimensional vector for every day in a time series of 100 days. I was reading about using PCA to reduce this to a one dimensional time series. If the time series is represented by a 10 by 100 matrix, what are the exact mathematical steps to reduce it to a 1 by 100 time series?

1

There are 1 best solutions below

2
On BEST ANSWER

I don't know what your mathematical background is, but in terms of matrices, you can do like this.

  1. Call the $10\times 100$ matrix for $M$.

  2. Now build a new matrix by subtracting the mean vector from each vector. $$M_{ml} = M - \mu$$

  3. Now calculate $M_{ml} {M_{ml}} ^T$

  4. Calculate the eigenvalues and eigenvectors for this matrix. By the spectral theorem it will have an ON basis of eigenvectors. As a usual ON transformation you can write it like $T = ADA^{T}$

  5. Now remove the rows of all the non-largest diagonal values in $D$ matrix. Call the modified matrix $D_m$

  6. To get the 1x100 matrix multiply the matrix $M_{ml}$ by the modified $D_mA^T$

  7. To project on the shrunken space we need to remove corresponding columns in $A$ matrix (same as the rows we removed in $5$)). Call the modified matrix $A_m$.

    Now your 1x100 matrix will be $(D_mA^T)M_{ml}$

    And your projection onto the space will be $A_m(D_mA^T)M_{ml}$