Question
ARIN7013/2023-2024 UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS Numerical Methods for Artificial Intelligence Assignment 3 Due Date: 23:59, April 11, 2024. There are 3 exercises. All assignments submitted after the due time will be given 0 mark. Please submit one group work only for each group. 1. (Compute the eigenvalue with the largest magnitude) Consider the symmetric ma- trix 2 1 1 0 1 3 1 1 A: = 11 41 01 1 3 and let v(0) = (0.5, 0.5, 0.5, 0.5) be the initial eigenvector. (a) Find the eigenvalue with the largest absolute value starting with v(0) use the power iteration. Write down your code, and display the results for the first three iteration. (b) Can you find the eigenvalue with the second absolute value using power itera- tion? If so, write down your result for the first three iteration. (c) Apply Rayleigh quotient iteration to A starting with v(0) to find the results for the first three iterations. = [x1 x2 x3 x4], where x₁ = 1 2. (PCA and kernel PCA) Given a data matrix X (1,0)ª, x2 = (0, −1)², x3 = (½‚¯✓½)³ and x₁ = ( √ √½)². √2 (a) Find the first principal component w Є R², and then compute 4 Σ Σ ||xi - (xi, w) w || i=1 (b) Let K(,) R² × R² → R given by : K(x, x') = |(x, x')|². Note that K(·) is a reproducing kernel, and thus there is a corresponding RKHS, denoted by (H, (·, ·)µ)· 1 i. Use this kernel to perform kernel PCA, and find the first principal com- ponent vЄH. ii. Recall that this first principal component v can be expressed as 4 v(x) = Σ a¿K (xi, x), Σαν satisfying (u, v) H = 1. Calculate 4 i=1 i=1 K(x) (v, K(x₁, ·))|| 3. (Implementation of PCA) Extract one subject in a particular pose from the following link: The Yale Face Database B, which include a number of 65 images. Denote them as X = [x₁, ···‚×n] with n = 65 and each image contains 50 × 50 i.e., x; Rd with d = 2500. (a) Depict two images from your extracted images. (b) Use PCA to find the first 10 principal component wk for k Calculate n Σκα i=1 10 | ||xi - (xi, Wk) Wk || 2. k=1 = 2500 pixels, == : 1, 2, . . ., 10. (c) Reconstruct your selected two images in (a) using the first 10 principal com- ponent and plot them. 2