Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this problem, you are using PCA to make face recognition. The task is to reproduce the results in the article by Adrian Tam,
In this problem, you are using PCA to make face recognition. The task is to reproduce the results in the article by Adrian Tam, available at https://machinelearningmastery.com/face-recognition-using-principal- component-analysis/ The dataset we use are the ORL Database of Faces, which is quite of age but we can download it from Kaggle: https://www.kaggle.com/kasikrit/att-database-of-faces/download The file is a zip file of around 4MB. It has pictures of 40 persons and each person has 10 pictures. Total to 400 pictures. When you submit your work to D2L, don't forget to include the data files. To illustrate the capability of using eigenface for recognition, we want to hold out some of the pictures before we generate our eigenfaces. We hold out all the pictures of one person as well as one picture for another person as our test set (in this part, you are required to hold out pictures of different persons from those in the article, so every one may use different pictures to test). The remaining pictures are vectorized and converted into a 2D numpy array. The author used Python to build the model. You can complete the task using R as well. If you use R, then some references can be found online, such as https://rpubs.com/danaecarrerasgarcia/529117. Based on your work and your training data, answer the following questions: (a) (1 point) How many PCs are needed to explain 95% of the variance? (b) (1 point) What is the rank of the data matrix? (c) (1 point) What is the rank of the covariance matrix? (d) (1 point) Given the rank of the covariance matrix, what is the upper bound on the number of non-zero eigenvalues? (e) (4 points) Discuss how do you choose a best model and if your model can correctly identify a person. You can set up a threshold for the L2 distance described in the article. If the best match's distance is less than the threshold, you would consider the face is recognized to be the same person. If the distance is above the threshold, you claim the picture is someone we never saw even if a best match can be find numerically.
Step by Step Solution
★★★★★
3.49 Rating (166 Votes )
There are 3 Steps involved in it
Step: 1
solution aThe number of PCs necessary to explain 95 of the variance can be found by calculating the ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started