Consider the six data points given in the table below. 1.5 1.9 6 Xi Yi 1...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the six data points given in the table below. 1.5 1.9 6 Xi Yi 1 2 2 • E = 0.005 2.3 10 2.6 30 3 47 In this problem, your task is to find the least squares regression line for this data. (a) Find the least squares regression line for the given data using QR factorization of the design matrix. You are encouraged to get computer assistance in this part. For example, two python functions that can be used are numpy.linalg.qr and scipy.linalg.qr. (Hint: First you should use the given data to construct the design matrix.) (b) In this part, you will use gradient descent method to compute the same least squares regression line numerically. Since it is not feasible to perform the necessary computation manually, a reasonable way is to write a small function in any computer program to carry out the task for you. In the web, there are many pages that describes how to do it using python; you can even make use of them. But you must first understand the mathematical formulation of the problem, of course. You can use the following parameters, although you are free to change them as long as your algorithm converges to a solution. Initial point: may be xo = (0, 0) or Xo = (1, 1) or any randomly generated point Learning rate: a = 0.001 Stopping criterion: ||Vf|| < € NOTE: Whenever you take computer assistance, please include the relevant prints/screenshots in your homework. Consider the six data points given in the table below. 1.5 1.9 6 Xi Yi 1 2 2 • E = 0.005 2.3 10 2.6 30 3 47 In this problem, your task is to find the least squares regression line for this data. (a) Find the least squares regression line for the given data using QR factorization of the design matrix. You are encouraged to get computer assistance in this part. For example, two python functions that can be used are numpy.linalg.qr and scipy.linalg.qr. (Hint: First you should use the given data to construct the design matrix.) (b) In this part, you will use gradient descent method to compute the same least squares regression line numerically. Since it is not feasible to perform the necessary computation manually, a reasonable way is to write a small function in any computer program to carry out the task for you. In the web, there are many pages that describes how to do it using python; you can even make use of them. But you must first understand the mathematical formulation of the problem, of course. You can use the following parameters, although you are free to change them as long as your algorithm converges to a solution. Initial point: may be xo = (0, 0) or Xo = (1, 1) or any randomly generated point Learning rate: a = 0.001 Stopping criterion: ||Vf|| < € NOTE: Whenever you take computer assistance, please include the relevant prints/screenshots in your homework.
Expert Answer:
Answer rating: 100% (QA)
a To find the least squares regression line using QR factorization of the design matrix we need to c... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these mathematics questions
-
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...
-
This case was written by Professor Michele Greenwald, Visiting Professor of Marketing at HEC Paris, for use with Advertising and Promotion: An Integrated Marketing Communications Perspective 7th...
-
Hi there , I need help. for my work i need a relevant and well written introduction as well as conclusion to the following below. My work is complete i just need a introduction and conclusion please...
-
In Exercises find the second derivative of the function. f(x) = x sin x
-
Stacee Laboratories Stacee Labs, the research subsidiary of Stacee Pharmaceuticals, Inc., has a long history of successful research and development of medical drugs. The work is conducted by pure...
-
How does a radiant hot water heating panel work?
-
In the past five years, there have been significant innovations in technology such as smartphones and tablets. Technology companies rely on intellectual property (IP) rights, such as patents,...
-
Celebration Apparel Inc. is considering two investment projects. The estimated net cash flows from each project are as follows: Each project requires an investment of $ 750,000. A rate of 15% has...
-
Assumethe following attributes :A, B, C, D, E, F and Gwiththe candidate key :Aand Cand the following functional dependencies : A--> B, F A, C-->D, E F --> G a. Draw the 1NF relational model and...
-
Furniture Land Inc. is a producer and retailer of high-end custom-designed furniture and uses the contract-based approach to revenue recognition. The company produces only to special order and...
-
During Year 1, Chung Corporation earned $7,100 of cash revenue and accrued $4,400 of salaries expense. Required Based on this information alone: a. Prepare the December 31, Year 1, balance sheet. b....
-
How do social movements and grassroots activism contribute to the mobilization of collective agency and the realization of progressive social change, particularly in the face of entrenched power...
-
To what extent do macro-level factors, such as globalization, climate change, and demographic shifts, drive systemic transformations and redefine the contours of social change on a global scale ?
-
What are some of the areas of public life that psychology is contributing to in the present day? What are some of the areas that psychology might or should be contributing to?
-
How have views on evolutionary psychology changed over the history of psychology? How has the idea of the individual differences changed?
-
Can roles be viewed as dynamic and context-dependent constructs, evolving over time and across different social contexts, or are they primarily static and predetermined by social structures ?
-
Boost Juice is considering opening 10 new franchises in shopping centres around Melbourne. Each franchise is expected to start earning $600,000 of revenue in each quarter of operation, growing by 6%...
-
Gordon and Lisa estimate that they will need $1,875,000 in 40 years for their retirement years. If they can earn 8 percent annually on their funds, how much do they need to save annually?
-
Indicate whether each of the items listed below would be included (I) in or excluded (E) from gross income for the 2012 tax year. ________a. Welfare payments ________b. Commissions ________c. Hobby...
-
Diane is a single taxpayer who qualifies for the earned income credit. Diane has two qualifying children who are 3 and 5 years old. During 2012, Diane's wages are $17,100 and she receives dividend...
-
Jim (age 50) and Martha (age 49) are married with three dependent children. They file a joint return for 2012. Their income from salaries totals $50,000, and they received $10,000 in taxable...
-
What are some specific ways to choose effective images?
-
When should you use visuals?
-
Why would you use a numerical table instead of a graph?
Study smarter with the SolutionInn App