Question: Accuracy of Different QR Implementations 10 points Implement both the classical and modified Gram-Schmidt procedures and use each to generate an orthogonal matrix whose columns

 Accuracy of Different QR Implementations 10 points Implement both the classical

Accuracy of Different QR Implementations 10 points Implement both the classical and modified Gram-Schmidt procedures and use each to generate an orthogonal matrix whose columns form an orthonormal basis for the column space of the n n Hilbert matrix with entries hij = 1/Q +j !), for n = 2, , 12, Note that this formula uses one-based indexing, while Python uses zero-based indexing. As a measure of the quality of the results (specifically, the potential loss of orthogonality), plot the quantity log10-0,which can be interpreted as "digits of accuracy," for each method as a function of n. In addition, try applying the classical procedure twice (i.e., apply your classical Gram-Schmidt routine to its own output to obtain a new Q), and again plot the resulting departure from orthogonality. Finally, repeat the previous experiment, but this time use the Householder method, that is, use the explicitly computed orthogonal matrix Q resulting from Householder QR factorization of the Hilbert matrix. Note that if the routine you write for Householder QR factorization does not form explicitly, then you can obtain 2 by multiplying the sequence of Householder transformations times a matrix that is initailized to the identity matrix I. Again, plot the departure from orthogonality for this method and compare it with that of the previous methods. How do the four methods compare in accuracy? You may also wish to investigate how they compare in speed and storage Store your Hilbert matrices in a list called hilbert. The list should contain eleven matrices ordered from smallest to largest. This is just to ensure that you are generating the matrices correctly before running tests with them. Write routines to perform both types of Gram-Schmidt and Householder Plot the "digits of accuracy" for each method as a function of n. Your plot, as with all plots in this course, should have an appropriate title, axis labels, a legend, etc. There should be four lines total, one for each of the three methods and one for which you ran classical Gram-Schmidt on its own output. Accuracy of Different QR Implementations 10 points Implement both the classical and modified Gram-Schmidt procedures and use each to generate an orthogonal matrix whose columns form an orthonormal basis for the column space of the n n Hilbert matrix with entries hij = 1/Q +j !), for n = 2, , 12, Note that this formula uses one-based indexing, while Python uses zero-based indexing. As a measure of the quality of the results (specifically, the potential loss of orthogonality), plot the quantity log10-0,which can be interpreted as "digits of accuracy," for each method as a function of n. In addition, try applying the classical procedure twice (i.e., apply your classical Gram-Schmidt routine to its own output to obtain a new Q), and again plot the resulting departure from orthogonality. Finally, repeat the previous experiment, but this time use the Householder method, that is, use the explicitly computed orthogonal matrix Q resulting from Householder QR factorization of the Hilbert matrix. Note that if the routine you write for Householder QR factorization does not form explicitly, then you can obtain 2 by multiplying the sequence of Householder transformations times a matrix that is initailized to the identity matrix I. Again, plot the departure from orthogonality for this method and compare it with that of the previous methods. How do the four methods compare in accuracy? You may also wish to investigate how they compare in speed and storage Store your Hilbert matrices in a list called hilbert. The list should contain eleven matrices ordered from smallest to largest. This is just to ensure that you are generating the matrices correctly before running tests with them. Write routines to perform both types of Gram-Schmidt and Householder Plot the "digits of accuracy" for each method as a function of n. Your plot, as with all plots in this course, should have an appropriate title, axis labels, a legend, etc. There should be four lines total, one for each of the three methods and one for which you ran classical Gram-Schmidt on its own output

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 Databases Questions!