In this assignment, we are interested in using Python to solving a weighted least squares (WLS)...
Fantastic news! We've Found the answer you've been seeking!
Question:
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/64fc683a23f3f_1694263351877.jpg)
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/64fc68423cb40_1694263360624.jpg)
Transcribed Image Text:
In this assignment, we are interested in using Python to solving a weighted least squares (WLS) problem. Compared to ordinary least squares that minimizes the mean squared error, the WLS problem instead assigns a unique weight o, to each sample and minimizes the weighted mean squared error WMSE(W) (x/w-1), where (x,y) (for 1 i m) represents a training sample and its target, a, ER (usually positive) is the weight assigned to sample i and w = [, ,w] Rd are the parameters we want to estimate. As in lecture, we can stack the training samples and targets into a matrix (known as the design matriz) and vector respectively. We denote these as X X -N For example for d = 2 and m=5, we may have the design matrix, target vector respectively as [1 4 4 2 2 5 6 1 3 -3 9 -10 m A 7. 01 0 A = and y= and y We may also transform the weights a,02,..., into a diagonal weight matrix A Rmxm as 0 (X2 ... 0 For example, if (0, 02, 03, 04, 05)= (1,2,1,3, 0.5), then 0 3/1 3/2 /m Om 1 000 0 0200 0 00 1 0 0 000 3 0 0 000 0.5 In this assignment, we are interested in using Python to solving a weighted least squares (WLS) problem. Compared to ordinary least squares that minimizes the mean squared error, the WLS problem instead assigns a unique weight o, to each sample and minimizes the weighted mean squared error WMSE(W) (x/w-1), where (x,y) (for 1 i m) represents a training sample and its target, a, ER (usually positive) is the weight assigned to sample i and w = [, ,w] Rd are the parameters we want to estimate. As in lecture, we can stack the training samples and targets into a matrix (known as the design matriz) and vector respectively. We denote these as X X -N For example for d = 2 and m=5, we may have the design matrix, target vector respectively as [1 4 4 2 2 5 6 1 3 -3 9 -10 m A 7. 01 0 A = and y= and y We may also transform the weights a,02,..., into a diagonal weight matrix A Rmxm as 0 (X2 ... 0 For example, if (0, 02, 03, 04, 05)= (1,2,1,3, 0.5), then 0 3/1 3/2 /m Om 1 000 0 0200 0 00 1 0 0 000 3 0 0 000 0.5
Expert Answer:
Answer rating: 100% (QA)
Define your design matrix X This matrix should contain the training samples each row ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The from-to Chart in the table below indicates the number of loads moved per 8hour day (above the slash) and the distances in ft (below the slash) between departments in a particular factory. Fork...
-
Nike is the worlds largest supplier and manufacturer of athletic shoes, apparel and sports equipment. The company claims to be dedicated to promoting the safety, health and well-being of people and...
-
When it gets hot outside, the level of crime increases. Using this statement, discuss the problems of trying to measure such a vague statement. Discuss the progression of moving from vague terms to...
-
Why is it that I got 0 Row with nothing showing up? Is there a flow in my logic? Using AdventureWorks DW2017, list all the Canadian customers who have spent more than $5,000 total. Show Customerkey,...
-
Use a small-sample sign test to analyze the aerobics data given in Case Study 13.3.1. Use the binominal distribution displayed in Question 14.2.1. Let = 0.05. Does your conclusion agree with the...
-
Let (x) = 5x 2 - 3 and g(x) = -x 2 + 4x + 1. Find the following. (a) (-2) (b) g(3) (c) (-k) (d) g(3m) (e) (x + h) (f) g(x + h) (g) (h) f(x +h)-f(x) h
-
Amie, Inc., has 100,000 shares of $2 par value stock outstanding. Prairie Corporation acquired 30,000 of Annies shares on January 1, 2007, for $120,000 when Amies net assets had a total fair value of...
-
Kate Petusky prepared Addison Controls' balance sheet and income statement for 2013. Before she could complete the statement of cash flows, she had to leave town to attend to a family emergency....
-
Entity G uses the percentage-of-receivables basis for recording bad debts expense. The accounts receivable balance is $750,000. Management estimates that 3% of accounts receivable will be...
-
Street, Rhode and Close carried on business in partnership sharing profits and losses, in the ratio 5 : 4 : 3. Their draft statement of financial position as on 31 March 20X2 was as follows: Street...
-
Kindly respond using a clear format. 1, Where goods have been let under higher purchase agreement and two thirds of the higher purchase price have been paid the owner shall not enforce any right to...
-
2. (10 points) Two suppliers of products are available to supply the needs of four supermarkets. Each supplier can provide 90 units per day. Each supermarket would like to receive 60 units per day....
-
QUESTION 3 (11 marks) Midrand Ltd acquired a 90% interest in Bramely Ltd on 2 December 20.21 for R2 million. The consideration was settled as follows: Cash payment, Issue of 100 000 shares to the...
-
1. Prepare a Proforma Income Statement for ACCO 295 Corp. (30 points) Use the same Excel table provided to do the calculations with the class explanation. 1. Selling and administrative expenses were...
-
Sandy Foot Hospital expanded their cardiovascular unit to include more operating rooms. They negotiated a 20-year loan with monthly payments and a large sum of $250,000 due at the end of the loan....
-
Oscillations and Resonance Name Lab Procedure Answer questions in red. Download and run the HTMLS application \"resonance\". Driving force: 30 N Driving equency: 5 rad. '5 Spring constant: 5 - 'Irn...
-
Flight Caf prepares in-flight meals for airlines in its kitchen located next to a local airport. The companys planning budget for July appears below: Flight Caf Planning Budget For the Month Ended...
-
What is the order p of a B + -tree? Describe the structure of both internal and leaf nodes of a B + -tree.
-
Suppose that u(t) is a solution to (9.77). Let N = M denote the positive definite square root of the mass matrix M, as defined in Exercise 8.4.27. (b) Explain in what sense this can serve as an...
-
Find a linear transformation that maps the unit circle x2 + y2 = 1 to the ellipse 1/4x2 + 1/9y2 = 1. Is your answer unique?
-
Let A have singular values 1, > > n. Prove that ATA is a convergent matrix if and only if 1 < 1. (Later we will show that this implies that A itself is convergent.)
-
7. A teacher working for the City of Lights earns vacation pay of $2,000 during 2008. However, the vacation will not be taken until the end of 2009. In the government-wide financial statements for...
-
8. Assume in question 7 that the teacher takes the vacation late in 2009 and is paid the entire $2,000. What journal entry is reported in creating each of the two types of financial statements?
-
5. A landfill is scheduled to be filled to capacity over a 10-year period. However, at the end of the first year of operations, the landfill is only 7 percent filled. How much liability for closure...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App