Principal component analysis-matlab

  • Thread starter Thread starter nikki92
  • Start date Start date
  • Tags Tags
    Component
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 1K views
nikki92
Messages
37
Reaction score
0

Homework Statement


How do I find the error of the PCA?

||x1hat - x1||^2 + ...+ ||xnhat-xn||^2 so xnhat is the pca one. What is xn?
 
Last edited:
Physics news on Phys.org
can you elaborate more? having some trouble guessing what your notation means.
 
Basically x= randn(100,15)
x_centered=(eye(100)-(1/100)*ones(100,100))*x to subtract the mean to center the data
[s,d,v]=svd(x_centered);

I need to find the principal components
which just the eigenvalues but according to my professor {divi}for i = 1 to 15.
Then I am asked what is the pca with 3, 4, 5 components. For 3 components is it just [d1v1 d2v2 d3v3]

Then I am asked to find the mse of it. I am confused what do I compare the PCA of 3 components to to take the F- norm?
 
Last edited: