7144CEM Assignment Help
Principles of Data Science Assignment help
(a) The eigenvectors of 𝐶 (i.e. the columns of 𝑃) are called “eigenfaces” (Turk and Pentland, 1991). Visualise the eigenfaces corresponding to the largest 10 eigenvalues. Comment on what you discover. You will need to remove vmin and vmax from the plt.imshow() example given above.
(b) Show (by example) that if y is any one column of Ysub then [email protected]+xbar perfectly recreates the corresponding column of Xsub. This shows that each “face” in Xsub is a “linear combination” of eigenfaces plus the “mean face”.
(c) Although 𝑃 is a 4096×4096 matrix, generally only those eigenfaces corresponding to the largest eigenvalues of 𝐶 are “useful”. If there are 𝑘 such eigenvalues (with 𝑘≥2), let Xpartial be the matrix formed from matrix multiplication of the first 𝑘 columns of 𝑃 and the first 𝑘 rows of Ysub, and adding xbar. Investigate how well Xpartial approximates Xsub for different values of 𝑘 by using the numpy.linalg.norm() function applied to Xpartial minus Xsub (this provides a measure for “goodness of fit”). Build an appropriate line graph as part of your investigation.
Leave A Comment