Question

In: Advanced Math

Gram method for computing least squares approximate solution. Algorithm 12.1 in the textbook uses the QR...

Gram method for computing least squares approximate solution. Algorithm 12.1 in the textbook uses the QR factorization to compute the least squares approximate solution xˆ = A†b, where the m × n matrix A has linearly independent columns. It has a complexity of 2mn2 flops. In this exercise we consider an alternative method: First, form the Gram matrix G = AT A and the vector h = AT b; and then compute xˆ = G−1h (using algorithm 11.2 in the textbook). What is the complexity of this method? Compare it to algorithm 12.1. Remark. You might find that the Gram algorithm appears to be a bit faster than the QR method, but the factor is not large enough to have any practical significance. The idea is useful in situations where G is partially available and can be computed more efficiently than by multiplying A and its transpose.

Solutions

Expert Solution

Gram method for computing least squares approximate solution. Algorithm 12.1 in the textbook uses the QR factorization to compute the least squares approximate solution xˆ = A†b, where the m × n matrix A has linearly independent columns. It has a complexity of 2mn2 flops. In this exercise we consider an alternative method: First, form the Gram matrix G = AT A and the vector h = AT b; and then compute xˆ = G−1h (using algorithm 11.2 in the textbook). What is the complexity of this method? Compare it to algorithm 12.1. Remark. You might find that the Gram algorithm appears to be a bit faster than the QR method, but the factor is not large enough to have any practical significance. The idea is useful in situations where G is partially available and can be computed more efficiently than by multiplying A and its transpose.

The coplecity of this method mm​​​​​2​​​​ flops.


Related Solutions

38. The least-squares regression method can be used to approximate a cost function. A disadvantage of...
38. The least-squares regression method can be used to approximate a cost function. A disadvantage of this method is ________. A) it requires a lot of prior cost data B) it does not use all the available data points C) it requires subjective placement of the line D) it is more subjective than engineering analysis Answer: A Diff: 2 LO: 3-4 AACSB: Reflective thinking skills Learning Outcome: Discuss and use various methods to estimate the variable and fixed costs portions...
Consider the following recursive algorithm for computing the sum of the first n squares: S(n) =...
Consider the following recursive algorithm for computing the sum of the first n squares: S(n) = 12 +22 +32 +...+n2 . Algorithm S(n) //Input: A positive integer n //Output: The sum of the first n squares if n = 1 return 1 else return S(n − 1) + n* n a. Set up and solve a recurrence relation for the number of times the algorithm’s basic operation is executed. b. How does this algorithm compare with the straightforward non-recursive algorithm...
How to solve for a and b using the method of least squares for: y =...
How to solve for a and b using the method of least squares for: y = ax/b+x?
Prove that the solution of the discrete least squares problem is given by the orthogonal projection.
Prove that the solution of the discrete least squares problem is given by the orthogonal projection.
What is the least squares method and how is it used to find the estimated regression...
What is the least squares method and how is it used to find the estimated regression equation? What is the role of least squares method in calculating coefficient of determination? Explain
What is the least squares method and how is it used to find the estimated regression...
What is the least squares method and how is it used to find the estimated regression equation? What is the role of least squares method in calculating coefficient of determination? Explain.
What is the least squares method and how is it used to find the estimated regression...
What is the least squares method and how is it used to find the estimated regression equation? What is the role of least squares method in calculating coefficient of determination? Explain.
What is the least squares method and how is it used to find the estimated regression...
What is the least squares method and how is it used to find the estimated regression equation? What is the role of least squares method in calculating coefficient of determination? Explain.
Write a JavaScript program to implement the Least-Squares Linear Regression algorithm shown below, for an arbitrary...
Write a JavaScript program to implement the Least-Squares Linear Regression algorithm shown below, for an arbitrary set of ( x, y ) data points entered by the user. Least-Squares Linear Regression: • Linear regression basically means finding the ( equation for the ) straight line that is the closest “fit” to a set of ( x, y ) data points. • Least-squares is a means of identifying the “best” fit between the line and the data. For each data point,...
How could a root finding algorithm like the bisection method be used to approximate a value...
How could a root finding algorithm like the bisection method be used to approximate a value such as sqrt(3). In other words how can a root finding algorithm find an x value with a given y value? Write a script to illustrate this usage scenario. Compare the output of your script with the result from a calculator. You must use matlab!! using a while loop.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT