0
$\begingroup$

Consider the following data set :

enter image description here

Now we need to calculate the principal component analysis for this data. Here are the eigenvalues and eigenvectors calculated for the covariance matrix of this data :

enter image description here

enter image description here

So the principal component is :

enter image description here

Now , when I have tried to do so by hand . I have found that the eigenvalues are 1.28 and 0.0492 , which are identical to the above solution. surly the principal component corresponds to the eigenvalue = 1.28 . However, when I have tried to solve for the eigenvector, the solution was [[0] [0]] as the augmented matrix of BX=0 Was [[1 0 0] [0 1 0]] . So where is the problem here? and also how can I find the transformed data after I calculate the principle component?

Edit : the covariance matrix is enter image description here

$\endgroup$
3
  • $\begingroup$ I am not exactly sure how to help out without trying a few different thing because I'm not exactly sure how you have defined Covariance matrix and principal component. There are a lot of non-standard, but still often used, definitions for both of these objects. If you could clarify, I might be able to help you out. For example, you ask about the transformed data, but also refer to the calculated principal component, which as far as I know it, is the transformed data. $\endgroup$ – ARandomName Feb 27 at 6:15
  • $\begingroup$ I have added the definition of the covariance matrix in the question. For the transformed data, after finding the principal components we need to reduce the dimensionality of the data using the calculated principal components. This is the transformed data. $\endgroup$ – John adams Feb 27 at 16:12
  • $\begingroup$ to calculate the principal components (i.e. dimension reduced data), you can decompose the original data matrix as $D=[X,Y] = U \Sigma V^*$ via an SVD. You can reconstruct the data matrix $D$ and capture some percent of the variance in the data by taking only $r$ first columns in $U$, $r$ first rows in $V^*$ and $r$ first singular values in $\Sigma$ (a diagonal matrix). Then the principal components, or as you call the transformed data, is given by $U^*D = \Sigma V^*$. Either lhs or rhs suffice. You can also compute the PC by taking eigendecomposition of $D^TD$. $\endgroup$ – ARandomName Feb 27 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.