In this mini-project you will use principal component analysis (PCA) to cluster images of human faces under varying illuminations. To this end we will use the Yale dataset (Yale.data.mat), which includes the data array Inages of size 48 x 42 x 64 x 38, containing 2432 photos of 38 subjects (64 photos per subject), each photo of size 48 x 42. These inners look like: The main intuition is that the vectorised photos of the same subjects lie close to each other in the space of principal components, and so we will use a simple nearest neighbor appronch on such space (a) Let xu C R301 denote the jth vectorized photo of the ith subject, and let X R201x24312 be the data matrix ontaining all the votorind photos. Randomly split X into truining data ?. e R2016 x 220 and testing data X R1in such a way that X. contains 58 images of each subject, and X contains 6 images of each subject. (b) Let U, ?. V denote the singular vnlue doornpowition of X.. such that X.-UEVT. (e) The jth column of U denotes the jth principal vector. Display the 5 (unvectorized) leading principal (d) The diagonal ewiries in ? denote the singular values. Int their magnituds. Ilow many of them are (e) Let U, demote the matrix finned with the firsEylumns of U, where r ? your anewer from (d). This vectors, often called eigenfaces significant way, U, spans the subepace containing most of tHe information of X similarly for R' ) La e, c R be the cocficient matris of X with rspect to U, such that x. -U.e. and As this poina we have tranoformed X, and X, into principal components space. More peenb. e and e arouhe "prawstawn of X-Mid ?. with mpext to the Isasis of principal votan, U. Now we will clamey In this mini-project you will use principal component analysis (PCA) to cluster images of human faces under varying illuminations. To this end we will use the Yale dataset (Yale.data.mat), which includes the data array Inages of size 48 x 42 x 64 x 38, containing 2432 photos of 38 subjects (64 photos per subject), each photo of size 48 x 42. These inners look like: The main intuition is that the vectorised photos of the same subjects lie close to each other in the space of principal components, and so we will use a simple nearest neighbor appronch on such space (a) Let xu C R301 denote the jth vectorized photo of the ith subject, and let X R201x24312 be the data matrix ontaining all the votorind photos. Randomly split X into truining data ?. e R2016 x 220 and testing data X R1in such a way that X. contains 58 images of each subject, and X contains 6 images of each subject. (b) Let U, ?. V denote the singular vnlue doornpowition of X.. such that X.-UEVT. (e) The jth column of U denotes the jth principal vector. Display the 5 (unvectorized) leading principal (d) The diagonal ewiries in ? denote the singular values. Int their magnituds. Ilow many of them are (e) Let U, demote the matrix finned with the firsEylumns of U, where r ? your anewer from (d). This vectors, often called eigenfaces significant way, U, spans the subepace containing most of tHe information of X similarly for R' ) La e, c R be the cocficient matris of X with rspect to U, such that x. -U.e. and As this poina we have tranoformed X, and X, into principal components space. More peenb. e and e arouhe "prawstawn of X-Mid ?. with mpext to the Isasis of principal votan, U. Now we will clamey