stober / pca

Principle Component Analysis in Python
40 stars 25 forks source link

[Questions] Input data matrix #1

Open tiancaipipi110 opened 5 years ago

tiancaipipi110 commented 5 years ago

Hi, I have couple questions

  1. Is each column of the input data matrix one sample? and it has more features than samples? i.e. 20000x20 matrix (20000 features, 20 samples). The eigenvectors is size (20000,20), eigenvalues is s**2, size (20,)?
  2. What is the input w, X, in here?
    def reconstruct(w, X, m,dim = 5):
    return np.dot(w[:dim],X[:dim,:]) + m
  3. What is def compute_projections(I,pcs,m): doing?
tiancaipipi110 commented 5 years ago

Also, shouldn't we compute[u,s,v] = np.linalg.svd(datac)instead of[u,s,v] = np.linalg.svd(T)?