PCA

3,970 views

Published on

Published in: Education
1 Comment
9 Likes
Statistics
Notes
  • good attempt
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
3,970
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
1
Likes
9
Embeds 0
No embeds

No notes for slide

PCA

  1. 1. Principal Component Analysis<br />Dr. Nidhi Mathur<br />
  2. 2. Principal Component Analysis or PCA is a way of identifying patterns in data and expressing data in such a way as to highlight their similarities and differences.<br />PCA is a powerful tool for analyzing data.<br />2<br />PCA - Dr. Nidhi Mathur<br />
  3. 3. Method<br />Get some data,<br />Subtract the mean,<br />Calculate the covariance matrix,<br />Calculate the eigenvectors and eigenvalues of covariance matrix,<br />Choose components and form a feature vector,<br />Derive the new data set.<br />3<br />PCA - Dr. Nidhi Mathur<br />
  4. 4. Image Representation<br />Rows of the pixels in an (NxN) image are placed<br />one after the other to form a one dimensional vector.<br />N x N Image<br />1 x N2 vector<br />4<br />PCA - Dr. Nidhi Mathur<br />
  5. 5. If there are M images, then<br />Now, this is the starting point of PCA Analysis.<br />5<br />PCA - Dr. Nidhi Mathur<br />
  6. 6. Let  be an 1 x N 2 vector corresponding to an N x N image.<br />Obtain images I1, I2, …..IM.<br />Represent every Ii as vector i.<br />Compute average vector <br />Subtract the mean vector<br />Compute the covariance matrix , <br /> where is an N 2 x M matrix<br />Compute the eigenvalues ui of ATA<br /><br />6<br />PCA - Dr. Nidhi Mathur<br />
  7. 7. Matrix ATA is very large and computation is impractical.<br /><ul><li>Consider AAT matrix.
  8. 8. Compute eigenvalues vi of AAT. </li></ul>(AT A and AAT have the same eigenvalues and their <br />eigenvectors are related as: ui = A x vi ) <br /><ul><li>AT A has N2 eigenvectors/eigenvalues
  9. 9. AAT has M eigenvectors/eigenvalues</li></ul><br />7<br />PCA - Dr. Nidhi Mathur<br />
  10. 10. M eigenvalues of AAT (along with their corresponding <br />eigenvectors )correspond to the M largest eigenvalues of <br />ATA (along with their corresponding eigenvectors ) <br /><ul><li>Compute the M best eigenvectors of ATA, ui = A x vi
  11. 11. Keep only K eigenvectors.(corresponding to the K largest values.)</li></ul>8<br />PCA - Dr. Nidhi Mathur<br />
  12. 12. 9<br />PCA - Dr. Nidhi Mathur<br />Thanks<br />

×