Question: hw 9 . m ( Function ) Problem 3 : Write a function that can be called as lambda _ vec, U my _ subspaceiteration

 hw9.m (Function) Problem 3: Write a function that can be called
hw9.m (Function)
Problem 3: Write a function that can be called as
lambda_vec, U my_subspaceiteration (Afun,W0, maxiter,, tol)
implementing subspace iteration for the dominant k eigenpairs of a symmetric nn
matrix A(including the Rayleigh-Ritz step, for which you may call the built-in Mat
lab function eig on a smaller kk matrix). The input Afun is a function handle
which, when called as Afun(V) for a matrix V with n rows, returns AV. The input
WO is an arbitrary initial guess for subspace iteration. The number k of columns in
the initial guess dictates the number k of dominant eigenvectors we seek. The outpu
lambda_vec is a vector of the k dominant eigenvalues, ordered non-increasingly, and
the columns of the output U are the corresponding dominant eigenvectors.
Use your function to run PCA on the data matrix Y from hw9.mat. The array Y
is mn, where m indicates the data dimension and n indicates the number of dat
points. You will have to de-mean Y yourself to produce a data matrix X with zer
points. You will have to de-mean Y yourself to produce a data matrix X with zero
appropriate function handle implementing matrix multiplication by xxTT via
Afun =@(W)x**(x'**(W)). Make sure to answer all parts and provide the correct MATLAB code. Met me know if there is anything I need to revise!
as lambda_vec, U my_subspaceiteration (Afun,W0, maxiter,, tol) implementing subspace iteration for the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!