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:
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,...
-
A 1400-kg automobile is driven down a 4 incline at a speed of 88 km/h when the brakes are applied, causing a total braking force of 7500 N to be applied to the automobile. Determine the distance...
-
Consider the following CFG for floating-point constants, without exponential notation. (Note that this exercise is somewhat artificial: the language in question is regular, and would be handled by...
-
Based on information in this chapter, recommend the most effective HR administrative approach or approaches for the owner of a small business with fewer than 50 employees and infrequent staffing...
-
Discuss some of the basic features of an ERP. How do these features distinguish an ERP from an integrated accounting software program?
-
Irvine Corporation's fiscal year-end is December 31, 2024. The following is a partial adjusted trial balance as of December 31. Accounts Debit Credit Retained Earnings $13,000 Dividends $1,300...
-
Consider the following costs for a certain chemical product: Fixed cost: $2.045 million/year. Variable costs: Material cost: 62 cents per gallon of product. Energy cost: 24 cents per gallon of...
-
Hayden is 13-years old and he has four years until he is planning on attending University or college. His parents have been saving $225 per month for his education in a RESP and it has a current...
-
Traditionally, the activities of labor unions have supported the development of gains for the American worker. As labor unions negotiate with management, those gains set a standard for other...
-
You are the human resources director for IMF Plastics Manufacturing. Roan, the VPHR, has reached out asking for your help because the organization has experienced significant growth through an...
-
Lisa is a supervisor working in Line CD-6 with 30 workers reporting to her. Her result-oriented and autocratic style has impressed her section ever since she joined the section. One Monday morning...
-
Describe a recent organizational change in your organization (Google) that affected you. Extensively explain how would you discuss the leadership models , if there was no apparent leader in the...
-
Describing the level of engagement of the sales team in the company: There are 35 people that make up the sales team at XYZ Company and are generally happy with their employment. While they love...
-
According to the Residency Review Committee, the trainingprogram for an Internist should include: 1) Geriatrics, pediatrics, dermatology, ophthalmology 2) Psychiatry, neurology, orthopedics,...
-
The following T-accounts show postings of selected transactions. Indicate the journal used in recording each of these postings a through e. Cash Accounts Receivable Inventory (d) 500 (e) 300 (b)...
-
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.)
-
Use the Internet to access Home Depot's most recent annual report. a. What evidence did you find that Home Depot continues to rely on present worth analysis in its corporate decision making? b. Does...
-
Reconsider the results you obtained for the Allister Company in Problem 4. Assume that Allister's uses the WACC for MARR. a. For each case (a through e), use the estimation equation given in Equation...
-
GeoWorld Systems uses a subset of the following questions during the interview process for new engineers. For each of the following cases, determine if "the project" or "do nothing" is preferred. The...
Study smarter with the SolutionInn App