Professional Documents
Culture Documents
Assignment 2 (CLO3) : X and Then The SVD V XV
Assignment 2 (CLO3) : X and Then The SVD V XV
Assignment 2 (CLO3)
Download the accompanying file of faces and read them one by one by storing them as columns
in a matrix X. Then, compute and subtract the mean in order for the rows to become zero-mean.
Perform an SVD to the matrix X, that is X = U ΣV T . In this way, the eigenfaces are the
columns of U . However, this needs a lot of computational effort because X has too many rows.
Alternatively, you can proceed as follows. First compute the product A = X T X and then the SVD
of A in order to compute the right singular vectors of X via A = V Σ2 V T . Then calculate each
eigenface according to ui = σ1i Xvi , where σi is the ith singular value of the SVD. In the sequel,
select one face at random in order to reconstruct it using the first 5, 30, 100, and 600 eigenvectors.