we will explore PCA as a visualization tool for Yale Face Database. Download the .m files...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
we will explore PCA as a visualization tool for Yale Face Database. Download the .m files and the database. Extract the face image files into a folder named yalefaces and put the .m files at the same level of the folder. Call this folder "problem_pca_face/". Open Matlab, change your "Current Folder" to "problem_pca_face/", and open main_pca_visualization.m. a) Run the code corresponding to this part only, describe the data structure of variable img_buffer. Set preview_img_flag to 1, re-run the code to visually inspect the whole database. b) Complete Matlab function [V, Lambda_mat] = PcaViaKlt (data) by implementing PCA using eigendecomposition on a sample covariance matrix of the face data. The detailed information about the input and outputs are given in the comments of the incomplete function. You may use built-in function eig for eigendecomposition. If your implementation is correct, after running the code of b), you will obtain a plot similar to the following. 6 5 4 239 2 1 0 5 0000000000000000 10 15 Index of sorted {} 20 25 c) Run the code of c) to visualize a few dominating eigenvectors. Comment on whether they reflect some characteristics of the faces you saw in a). d) The code of d) projects each face image (coming from one of the four selected classes) onto a 2D space. Comment on PCA's data visualization performance in this specific example. we will explore PCA as a visualization tool for Yale Face Database. Download the .m files and the database. Extract the face image files into a folder named yalefaces and put the .m files at the same level of the folder. Call this folder "problem_pca_face/". Open Matlab, change your "Current Folder" to "problem_pca_face/", and open main_pca_visualization.m. a) Run the code corresponding to this part only, describe the data structure of variable img_buffer. Set preview_img_flag to 1, re-run the code to visually inspect the whole database. b) Complete Matlab function [V, Lambda_mat] = PcaViaKlt (data) by implementing PCA using eigendecomposition on a sample covariance matrix of the face data. The detailed information about the input and outputs are given in the comments of the incomplete function. You may use built-in function eig for eigendecomposition. If your implementation is correct, after running the code of b), you will obtain a plot similar to the following. 6 5 4 239 2 1 0 5 0000000000000000 10 15 Index of sorted {} 20 25 c) Run the code of c) to visualize a few dominating eigenvectors. Comment on whether they reflect some characteristics of the faces you saw in a). d) The code of d) projects each face image (coming from one of the four selected classes) onto a 2D space. Comment on PCA's data visualization performance in this specific example.
Expert Answer:
Answer rating: 100% (QA)
a Data structure of variable imgbuffer The variable imgbuffer is a 3D array where the first dimension represents the number of images in the database ... View the full answer
Related Book For
Intermediate Accounting
ISBN: 978-1260481952
10th edition
Authors: J. David Spiceland, James Sepe, Mark Nelson, Wayne Thomas
Posted Date:
Students also viewed these accounting questions
-
Reflect on your readings and the Biblical Perspective as you think through the following questions: Is it wrong for a business to seek to maximize profits? What does the Bible say about earning...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Below are the Statements of Comprehensive Income of A and B Companies for 2020. A's Statement of Comprehensive Income was prepared before it reported its share of B's income. A uses the equity...
-
Two springs, with force constants k1 and k2, are connected in parallel, as shown in FIGURE 7-29. How much work is required to stretch this system a distance x from the equilibrium position? m-
-
At the beginning of the current season, the ledger of Village Tennis Shop AG showed Cash CHF2,500, Inventory CHF1,700, and Share Capital-Ordinary CHF4,200. The following transactions were completed...
-
Janet Agnew and Buford Franco are partners in a business. Each partner withdraws assets during May of the current year. Instructions: Journalize the transactions using page 12 of a cash payments...
-
Flowers Corporation reported net cash provided by operating activities of $412,000, net cash used by investing activities of $250,000, and net cash provided by financing activities of $70,000. In...
-
05 The Regal Cycle Company manufactures three types of bicycles-a dirt bike, a mountain bike, and a racing bike. Data on sales and expenses for the past quarter follow. Sales Variable manufacturing...
-
The performance (in thousands of dollars) of Sandpiper Airlines for the most recent year is shown in the following table: The static budget had been based on a budget of $.35 revenue per passenger...
-
Write a program in visual studios c# that stimulates a bank, You must be able to desposit money and withdrwa money , check the balance and calculate savings after a certain number of years. This is...
-
San Antonio Chair Inc. has direct labor cost standard of $14 per direct labor hour and an efficiency standard of 4 hours per chair. The actual results for the period when 30 chairs were built were...
-
Rachel expects her take-home annual salary this year will be about $65,000 while Finn is expects to make about $45,000. Using the traditional financial guideline suggestion of "two and a half times...
-
Problem 4. At McDonald's, 1/4 pounder burgers are cooked in a grill press. This saves time by cooking from the top and bottom at the same time. Burgers are grilled immediately after coming out of the...
-
Antie Lope has been saving $6000 annually for the past 28 years in an investment account which has been earning 9% annually. She is planning on retiring now. She is a little afraid that she might...
-
How do intersectionality frameworks enhance our understanding of social stratification by examining the interconnectedness of various social categories and identities ?
-
A projectile is fired vertically upward from the surface of planet Moorun of mass 7 1024 kg and radius 4 106 m. If this projectile is to rise to a maximum height above the surface of Moorun equal to...
-
Imagine a sound wave with a frequency of 1.10 kHz propagating with a speed of 330 m/s. Determine the phase difference in radians between any two points on the wave separated by 10.0 cm.
-
GlaxoSmithKline is a global pharmaceutical and consumer health-related products company located in the United Kingdom. The company prepares its financial statements in accordance with International...
-
Explain what is meant by noncash investing and financing activities pertaining to the statement of cash flows. Give an example of one of these activities.
-
The general ledger of the Karlin Company, a consulting company, at January 1, 2021, contained the following account balances: The following is a summary of the transactions for the year:a. Service...
-
People are at their peak in terms of productivity when they are _________.
-
Since the 1980s, the share of measured income received by the top 5 percent has _________ and that of the lowest fifth of families has _________.
-
At any moment in time, middle-aged people tend to have _________ incomes than both younger and older people do.
Study smarter with the SolutionInn App