on-internet
← Community

PCA Eigenface is wrong and staticy, and I don’t know what I’m doing wrong

Stack Overflow ·

I am trying to generate eigenfaces using principal component analysis and have gone through the following steps to do so. Am I missing something or doing something wrong? data matrix: (N, width * height) normalized matrix: data matrix - mean vector covariance matrix: (data matrix).T @ (data matrix) *results in matrix of shape (width * height, width * height) find eigenvectors of covariance matrix using np.linalg.eig function rescale the eigenvector corresponding to the largest eigenvalue to fit within 0 and 255 reshape the eigenvector to (width, height) display the eigenvector. Code is below i

Comments

Sign in or sign up to comment and upvote.

No comments yet.